大约有 6,579 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0116 秒)
Laya_社区(5232) Laya3.0_api(482) Laya2.0_文档(363) Laya_示例(154) Laya2.0_示例(116) Laya3.0_文档(101) Laya2.0_api(67) laya_api(64)
...r,一个是Fire 。我在主类GameStart里面调用 Laya.stage.addChild(new Player())和Laya.stage.addChild(new Fire()),这两个精灵都能在舞台上面显示,但是当我把aya.stage.addChild(new Fire()) 放到类Player中的构造函数中时,舞台上面只有Player精灵...
来源: Laya_社区 发布时间: 20180828
...} createApe() { const Sprite = Laya.Sprite, Event = Laya.Event; this.ape = new Sprite(); this.ape.loadImage(ApePath); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(ApePath); this.ape.pivot(texture.width / 2, texture.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya....
来源: Laya2.0_示例 发布时间: 20251130
...绑定不同的事件? Laya.init(400, 400, laya.webgl.WebGL); var img1 = new Laya.Sprite(); img1.loadImage('https://layaair.ldc.layabox.com/demo/h5/res/apes/monkey2.png',100,100,90,90); Laya.stage.addChild(img1); img1.on(Laya.Event.CLICK,this, function(name){ console.log(name);},['图1']); var img...
来源: Laya_社区 发布时间: 20180621
...结束,点重新开始,飞机才出来 function onLoaded() { start = new GameStartUI(); start.btn_start.on(Event.MOUSE_UP,this,gameInit) Laya.stage.addChild(start); } function gameInit() { map = new GameBgUI(); Laya.stage.addChild(map); play = new GamPlayUI(); Laya.stage.addChild(play); hero = n...
来源: Laya_社区 发布时间: 20180911
...意 ts 1.4 添加一盏灯光 var directionLight =scene.addChild(new Laya.DirectionLight()) as Laya.DirectionLight; directionLight.ambientColor = new Laya.Vector3(0.7, 0.6, 0.6); directionLight.specularColor = new Laya.Vector3(1.0, 1.0, 0.9); ...
来源: Laya_社区 发布时间: 20161012
...ralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } n...
来源: Laya2.0_示例 发布时间: 20251130
...ralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } n...
来源: Laya2.0_示例 发布时间: 20251130
...a.d3.js:24049: RangeError: Array buffer allocation failed this._vertices = new Float32Array(this._floatCountPerVertex * lastVBVertexCount); ^^ RangeError: Array buffer allocation failed at new ArrayBuffer (<anonymous>) at new Float32Array (<anonymous>) at ShurikenParticleSystem._initBuff...
来源: Laya_社区 发布时间: 20211211
...var texture: Laya.Texture = Laya.Loader.getRes("progress.png"); this.spe = new coolDownSprite(); this.spe.init(texture); //this.spe.initWithoutTexture(128, 128); this.spe.pos(300, 350); this.spe.setProgress(this.progress); Laya.stage.addChild(this.spe); ----------------------源码------------------...
来源: Laya_社区 发布时间: 20170606
...ralRect(); } createCantralRect() { const Sprite = Laya.Sprite; this.rect = new Sprite(); this.rect.graphics.drawRect(-100, -100, 200, 200, "gray"); Laya.stage.addChild(this.rect); this.updateRectPos(); } updateRectPos() { this.rect.x = Laya.stage.width / 2; this.rect.y = Laya.stage.height / 2; } } n...
来源: Laya2.0_示例 发布时间: 20251130