大约有 1,138 项符合查询结果, 库内数据总量为 31,625 项。 (搜索耗时: 0.0344 秒)
Laya_社区(821) Laya2.0_文档(173) Laya_示例(51) Laya2.0_示例(43) Laya3.0_api(23) Laya3.0_文档(20) Laya2.0_api(4) laya_api(3)
...this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化角色 this.hero.init("hero",0,1,0,30); // 设置射击类型 this.hero.shootType = 1...
来源: Laya_社区 发布时间: 20170525
... TextArea 实例。 package { import laya.ui.TextArea; import laya.utils.Handler; public class TextArea_Example { public function TextArea_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 Laya.loader.load(["resource/ui/inpu...
来源: Laya3.0_api 发布时间: 20231115
...。 ```typescript Laya.Mesh.load("res/threeDimen/Physics/table.lm", Laya.Handler.create(this, function(mesh) { //....省略中间 //读取导出的桌子模型 var table = scene.addChild(new Laya.MeshSprite3D(mesh)); //给桌子加刚体并且设置刚体属性 var rigidBody = table.addComponent(Lay...
来源: Laya2.0_文档 发布时间: 20210715
...this.bg); // 加载图集资源 Laya.loader.load("res/atlas/war.json",Laya.Handler.create(this,onLoaded),null,Laya.Loader.ATLAS); })(); function onLoaded(){ // 创建一个主角 this.hero = new Role(); // 初始化角色 this.hero.init("hero",0,1,0,30); // 设置射击类型 this.hero.shootType = 1...
来源: Laya_社区 发布时间: 20170525
... "res/building.png", // 你的建筑图片路径 Laya.Handler.create(this, () => { // 加载完成后绘制到building Sprite上 let texture = Laya.loader.getRes("res/building.png"); this.building.graphic...
来源: Laya_社区 发布时间: 20251125
...。 ```typescript Laya.Mesh.load("res/threeDimen/Physics/table.lm", Laya.Handler.create(this, function(mesh:Laya.Mesh) { //....省略中间 //读取导出的桌子模型 var table = scene.addChild(new Laya.MeshSprite3D(mesh)) as Laya.MeshSprite3D; //给桌子加刚体并且设置刚体属性 var rig...
来源: Laya2.0_文档 发布时间: 20210714
...一张桌子。 ```typescript Mesh.load("res/threeDimen/Physics/table.lm", Handler.create(this, function(mesh:Mesh):void { //....省略中间 //读取导出的桌子模型 var table:MeshSprite3D = scene.addChild(new MeshSprite3D(mesh)) as MeshSprite3D; //给桌子加刚体并且设置刚体属性 va...
来源: Laya2.0_文档 发布时间: 20210714
...("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下屏幕后,会创建一个特效 mouseDown(e: Event): void { var particle = Particle3D.Create(this.filePath); this.owner.addChild(particle); } //鼠标抬起后,...
来源: Laya3.0_文档 发布时间: 20251010
...("Game start"); //加载粒子特效资源 Laya.loader.load(this.filePath, Handler.create(this, () => { })); } //每次鼠标点下屏幕后,会创建一个特效 mouseDown(e: Event): void { var particle = Particle3D.Create(this.filePath); this.owner.addChild(particle); } //鼠标抬起后,...
来源: Laya3.0_文档 发布时间: 20250104
...播放动画 Tween.to(item, {y : -10, scaleX : 0.1, alpha : 0}, 300, null, Handler.create(this, this.itemTweenComplete, [item])); this.updateScore(); } } } } //人物如果踩到地板了 就把人物的坐标设置到地板上面 this.player.y = floor.y; //如果到地板上面的 就得重置跳...
来源: Laya_社区 发布时间: 20160803