• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 4,008 项符合查询结果, 库内数据总量为 30,779 项。 (搜索耗时: 0.0080 秒)

61. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 97%]

...ya.Skeleton> = [];  public static getInstance():DdzLandlordAni{ return this.instance(DdzLandlordAni); }  public constructor(){ super(); this.initTemplet(); }  public static destoryInstance(){ if(this.mInstance){ (<DdzLandlordAni>this.mInstance).destory(); this.mInstance = null; } }  pub...

来源: Laya_社区 发布时间: 20190821

62. 鼠标交互-Hold [ 97%]

...bgColor = "#232628"; Stat.show(); Laya.loader.load(apePath, Handler.create(this, this.createApe)); } createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(apePath); let texture = Laya.loader.getRes(apePath); this.ape.pivot(texture.width / 2, textur...

来源: Laya2.0_示例 发布时间: 20241119

63. Laya.stage.mouseX; Laya.stage.mouseY取到的坐标用来赋给画曲线方法的起点;在左顶点正常,越往右下角起点就越偏移了 [ 97%]

...= ; constructor() { Laya.init(1600, 1400); Laya.stage.bgColor = "#000000"; this.ps = new Laya.Sprite(); Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.down2) Laya.stage.on(Laya.Event.MOUSE_UP, this, this.up2) Laya.stage.addChild(this.ps); } down2() { this.a = Laya.stage.mouseX; this.b = Laya.stage....

来源: Laya_社区 发布时间: 20170721

64. 骨骼动画-多纹理 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes1/dragon.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(...

来源: Laya2.0_示例 发布时间: 20241119

65. socket大型项目回调 [ 97%]

... = console.log; console.warn = console.log; console.error = console.log; } this._message = new Message(); this._package = new Package(); this.socket = null; this.callbacks = {}; this.handlers = {}; // Map from request id to route this.routeMap = {}; this.heartbeatInterval = 0; this.heartbeatTimeout ...

来源: Laya_社区 发布时间: 20180119

66. Sprite-屏幕截图 [ 97%]

...() { const Browser = Laya.Browser, WebGL = Laya.WebGL, Stage = Laya.Stage; this.btnArr = ["res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png", "res/threeDimen/ui/button.png"]; this.nameArr = ["canvas截图","sprite截图","清理"]; this._canvas = null; this.aimSp = null; this.drawImage =...

来源: Laya2.0_示例 发布时间: 20241119

67. tiledmap有时尺寸不正确 [ 97%]

...图的配置信息 */ public create(conf:LevelConf, handler:Handler):void{ this._mLevelConf = conf; this._mCompleteHandler = handler; this._mViewPortX = 0; this._mViewPortY = 0; this._mTiledMap = new TiledMap(); this._mLoadState = ESceneLoadState.eLoadMap; this._mTiledMap.createMap(conf.fileName + "...

来源: Laya_社区 发布时间: 20180529

68. 区块地图-滚动地图 [ 97%]

...tage.SCALE_FULL; Stat.show(); createMap(); Laya.stage.on(Event.MOUSE_DOWN, this, mouseDown); Laya.stage.on(Event.MOUSE_UP, this, mouseUp); })(); //创建地图 function createMap() { //创建地图对象 tiledMap = new TiledMap(); mX = mY = 0; //创建地图,适当的时候调用destory销毁地...

来源: Laya_示例 发布时间: 20241119

69. webGL模式下 graphic画线涂鸦,一直不停画会出现线条异常 [ 97%]

...=new Laya.Point(); pos1:Laya.Point=new Laya.Point(); __mouseDown(e:Event){ this.pos0.x=this.bmp.mouseX; this.pos0.y=this.bmp.mouseY; this.pos1.x=this.bmp.mouseX this.pos1.y=this.bmp.mouseY; this.bmp.on(Laya.Event.MOUSE_MOVE, this, this.__mouseMove); this.bmp.on(Laya.Event.MOUSE_UP, this, this.__mous...

来源: Laya_社区 发布时间: 20170831

70. 骨骼动画-藤蔓 [ 97%]

...leMode = Stage.SCALE_SHOWALL; Laya.stage.bgColor = "#ffffff"; Stat.show(); this.startFun(); } startFun() { const Templet = Laya.Templet, Event = Laya.Event; const mAniPath = "res/spine/spineRes5/vine.sk"; mFactory = new Templet(); mFactory.on(Event.COMPLETE, this, this.parseComplete); mFactory.on(Ev...

来源: Laya2.0_示例 发布时间: 20241119