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

大约有 4,094 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0083 秒)

61. list ,增加item ,我想在末尾增加,但是每次都给我翻倍的增加,如何解决 [ 97%]

...次都给我翻倍的增加,如何解决 _proto.room_xinxi=function(){ this.roombg=new Laya.Image($mj.Curr_Game_ImagePath + "hall/room_bg.png"); this.roombg.pos(50,150); this.addChild(this.roombg); var button = new Sprite(); button.loadImage($mj.Curr_Game_ImagePath + "hall/room_jiesan.png"); butto...

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

62. 图片像素精准点击问题! [ 97%]

...mage; constructor() { // 鼠标事件 Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.onMouseDown); Laya.stage.on(Laya.Event.MOUSE_MOVE, this, this.onMouseMove); Laya.stage.on(Laya.Event.MOUSE_UP, this, this.onMouseUp, [true]); } /** 按钮动画处理 */ private hitTest(t: Laya.Image) { let s = t.s...

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

63. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 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

64. 鼠标交互-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_示例 发布时间: 20251130

65. 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

66. 骨骼动画-多纹理 [ 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_示例 发布时间: 20251130

67. 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

68. 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_示例 发布时间: 20251130

69. 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

70. 区块地图-滚动地图 [ 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_示例 发布时间: 20251130