大约有 2,307 项符合查询结果, 库内数据总量为 31,580 项。 (搜索耗时: 0.0071 秒)
Laya_社区(1512) Laya2.0_文档(259) Laya_示例(138) Laya2.0_示例(101) Laya3.0_api(80) Laya2.0_api(74) Laya3.0_文档(73) laya_api(70)
...; soundButton.y = (Laya.stage.height - soundButton.height) / 2; Laya.stage.addChild(soundButton); //创建一个Sprite充当音乐播放按钮 var musicButton = createButton("播放音乐"); musicButton.x = soundButton.x + gap + soundButton.width; musicButton.y = soundButton.y; Laya.stage.addChild(m...
来源: Laya_社区 发布时间: 20170527
...ght / 2); ani.pos(Laya.stage.width / 2, Laya.stage.height / 2); Laya.stage.addChild(ani); } })();module laya { import Animation = Laya.Animation; import Stage = Laya.Stage; import Rectangle = Laya.Rectangle; import Loader = Laya.Loader; import Browser = Laya.Browser; import WebGL = Laya.WebGL; expor...
来源: Laya_示例 发布时间: 20251209
...8"; this.showApe(); } showApe() { this.ape = new Laya.Sprite(); Laya.stage.addChild(this.ape); this.ape.loadImage("res/apes/monkey2.png"); this.ape.pivot(55, 72); // this.ape.pos( Laya.stage.width / 2, Laya.stage.height / 2); this.ape.x = Laya.stage.width / 2; this.ape.y = Laya.stage.height / 2; thi...
来源: Laya2.0_示例 发布时间: 20251209
...ateApe() { const Sprite = Laya.Sprite; this.ape = new Sprite(); Laya.stage.addChild(this.ape); let texture = Laya.loader.getRes(apePath); this.ape.graphics.drawTexture(texture); this.ape.x = (Laya.stage.width - texture.width) / 2; this.ape.y = (Laya.stage.height - texture.height) / 2; } applayFilter...
来源: Laya2.0_示例 发布时间: 20251209
...悲剧 this.bg = new BackGround(); // 把背景添加到舞台 Laya.stage.addChild(this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化...
来源: Laya_社区 发布时间: 20170525
...e)); } onComplete(){ //创建场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //创建相机 var camera = new Laya.Camera(0, 0.1, 100); scene.addChild(camera); //设置相机的名称 camera.na...
来源: Laya_社区 发布时间: 20190605
...ton.scale(0.5,0.5);//动画缩放为原始状态的二分之一 Laya.stage.addChild(skeleton);//添加动画至舞台,这时候运行,动画已经可以播放了 createButton();//创建一个按钮,用来切换皮肤使用 } private function createButton():void { var btn:Sprite=new Sprite();//...
来源: Laya_社区 发布时间: 20170324
...label.stroke = STROKE_WIDTH; label.strokeColor = strokeColor; } Laya.stage.addChild(label); return label; } })();module laya { import Stage = Laya.Stage; import Label = Laya.Label; import WebGL = Laya.WebGL; export class UI_Label { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(...
来源: Laya_示例 发布时间: 20251209
...stage.width - 200) / 2; rect.y = (Laya.stage.height - 200) / 2; Laya.stage.addChild(rect); //增加鼠标事件 rect.on(Event.MOUSE_DOWN, this, this.mouseHandler); rect.on(Event.MOUSE_UP, this, this.mouseHandler); rect.on(Event.CLICK, this, this.mouseHandler); rect.on(Event.RIGHT_MOUSE_DOWN, this, t...
来源: Laya2.0_示例 发布时间: 20251209
...建 Particle2D 实例 let partIns = new Particle2D(settings); Laya.stage.addChild(partIns); // 开始发射粒子 partIns.emitter.start(); // 播放 partIns.play(); partIns.x = Laya.stage.width / 2; partIns.y = Laya.stage.height / 2; } } new Particle_T1();module laya { import Stage = Laya.Stage; imp...
来源: Laya2.0_示例 发布时间: 20251209