大约有 488 项符合查询结果, 库内数据总量为 30,903 项。 (搜索耗时: 0.0044 秒)
...概就是下面这样 // Test01是ui的逻辑类 var Test01 = (function (_super) { function Test01() { Test01.__super.call(this);// 调试用,看看过了多少帧,才就绪 this.numPreloadCalls = 0; // 执行预加载 this.preload(this.onP...
来源: Laya_社区 发布时间: 20180622
...yBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正常,反之则异常 //_shape.cacheAsBitmap=true; pos(300,300); Tween.t...
来源: Laya_社区 发布时间: 20170124
...ty({ type: Laya.SoundNode }) public sound: Laya.SoundNode; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { this.sound.source = "resources/sound.wav"; //音频路径 this.sound.loop = 0; //循环...
来源: Laya3.0_文档 发布时间: 20240910
.../ class Boat extends Laya.Sprite { private bt:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 private bg:Laya.Sprite; constructor(){ super(); this.in...
来源: Laya_社区 发布时间: 20160804
...我用的是1.7.1JS版的function MousePickingScene() { MousePickingScene.super(this); this.ray = new Laya.Ray(new Laya.Vector3(0, 0, 0), new Laya.Vector3(0, 0, 0)); this.point = new Laya.Vector2(); this._outHitInfo = new Laya.RaycastHit(); this.phasorSpriter3D = new Laya.PhasorSpriter3D(); this.cam...
来源: Laya_社区 发布时间: 20170323
...ty({ type: Laya.VideoNode }) public video: Laya.VideoNode; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 鼠标点击触发播放 Laya.stage.on(Laya.Event.MOUSE_DOWN, () => { Laya.loader.load(...
来源: Laya3.0_文档 发布时间: 20250103
..._VALUE = 0; //最大值 this.MAX_VALUE = 100; //值 this.value = 100; Hp.__super.call(this); this.init(type); } //能量类型 Hp.HP_TYPE_ENERGY = "hp_type_energy"; //速度类型 Hp.HP_TYPE_SPEED = "hp_type_speed"; //Hp Laya.class(Hp,"Hp", laya.display.Sprite); var _proto = Hp.prototype; _proto.ini...
来源: Laya_社区 发布时间: 20160803
...BoxMove"; export default class GameUI extends Laya.Scene { constructor() { super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100))); camera...
来源: Laya_社区 发布时间: 20190314
...dule ui { export class MainSceneUI extends Laya.SceneBase { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("MainScene"); } } REG("ui.MainSceneUI",MainSceneUI); } 期待生成SceneBase, 结果仍然生成Laya.SceneBase 其他关联链接: https://ask.la...
来源: Laya_社区 发布时间: 20190418
.../loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方式 查看效果不同 loadPage.openSce...
来源: Laya_社区 发布时间: 20181124