大约有 27 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0039 秒)
...onsole.log("update"); var c = Math.floor(Math.random()*4); console.log(c); switch(c) { case 0:text.color='red';break; case 1:text.color="blue";break; case 2:text.color ='black';break; case 3:text.color = 'green';break; case 4:text.color = "yellow";break; } console.log(text.color); } ```注意Props...
来源: Laya_社区 发布时间: 20180620
...ht = 21; var texture1 = Laya.loader.getRes("res/hp_bg.png"); var texture2; switch (type) { case Hp.HP_TYPE_ENERGY: texture2 = Laya.loader.getRes("res/en_bar.png"); break; case Hp.HP_TYPE_SPEED: texture2 = Laya.loader.getRes("res/hp_bar.png"); break; } this.bg = new Sprite(); this.bar = new Sprite();...
来源: Laya_社区 发布时间: 20160803
...6), 0, 0, 32, 96); this.rightBg.width = 32; this.addChild(this.rightBg); } switch(type){ case 1: this.rightBg.visible = false; this.bg.graphics.drawTexture(this.bgTexture, 0, 0, 960, 96); break; default: //随机计算一个宽度 当然 最小是3倍 以防难度太难 var _w = 32 * (3 + parseInt(1...
来源: Laya_社区 发布时间: 20160801
... ```typescript function(e:Event) { this._castType++; this._castType %= 2; switch (this._castType) { case 0: (e.target as Button).label = "释放显存"; this.loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (this._scene)//_scene不为空表示场景已加载完成 this.gar...
来源: Laya2.0_文档 发布时间: 20210715
...on)) ```typescript function(e:Event):void { _castType++; _castType %= 2; switch (_castType) { case 0: (e.target as Button).label = "释放显存"; loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (_scene)//_scene不为空表示场景已加载完成 garbageCollection(); b...
来源: Laya2.0_文档 发布时间: 20210715
...cript function(e:Laya.Event):void { this._castType++; this._castType %= 2; switch (this._castType) { case 0: (e.target as Button).label = "释放显存"; this.loadScene(); break; case 1: (e.target as Button).label = "加载场景"; if (this._scene)//_scene不为空表示场景已加载完成 this.ga...
来源: Laya2.0_文档 发布时间: 20210715
...0); Laya.stage.addChild(txt); txt.on(Laya.Event.CLICK, this, function(e) { switch (e.type) { case Laya.Event.CLICK: gameStart(); break; } }); //注册鼠标点击 加入一个显示得分的函数,分数由时间和出错次数决定,这个函数将会在游戏gameStart函数中调用,因为...
来源: Laya_社区 发布时间: 20160623