大约有 438 项符合查询结果, 库内数据总量为 30,784 项。 (搜索耗时: 0.0039 秒)
Laya_社区(291) Laya2.0_示例(37) Laya_示例(31) Laya2.0_文档(27) Laya2.0_api(18) laya_api(16) Laya3.0_文档(13) Laya3.0_api(5)
.../bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } private hitPoint(e:Laya.Event): void { console.log(this.s.hitTestPoint(e.stageX, e.stageY)); } } 很简单的代码,不知道什么hitTestPoint始终得到的是false.我打印出s的宽...
来源: Laya_社区 发布时间: 20170319
...' + i) as Laya.Image; console.log(e); e.on(Laya.Event.CLICK, this, this.onBtnClick); } 按钮事件 private onBtnClick(event:Laya.Event): void { let b = event.currentTarget as Laya.Image; console.log('onClickLevel > ' + b.skin); this.removeSelf(); Lay...
来源: Laya_社区 发布时间: 20190802
...e { import laya.display.Animation; import laya.display.Sprite; import laya.events.Event; import laya.events.Keyboard; import laya.utils.Stat; import laya.webgl.WebGL; public class ClearTextureResTest { private var sp:Sprite; public function ClearTextureResTest() { WebGL.enable(); Laya.init(1000, 800...
来源: Laya2.0_文档 发布时间: 20210714
...e { import laya.display.Animation; import laya.display.Sprite; import laya.events.Event; import laya.events.Keyboard; import laya.utils.Stat; import laya.webgl.WebGL; public class ClearTextureResTest { private var sp:Sprite; public function ClearTextureResTest() { WebGL.enable(); Laya.init(1000, 800...
来源: Laya2.0_文档 发布时间: 20200929
...file:///E:/LayaWorkspace/javaScriptLaya/bin/libs/laya.core.js:12657:28) at EventHandler.__proto.runWith (file:///E:/LayaWorkspace/javaScriptLaya/bin/libs/laya.core.js:709:27) at ResInfo.__proto.event (file:///E:/LayaWorkspace/javaScriptLaya/bin/libs/laya.core.js:479:28) at LoaderManager.__proto._end...
来源: Laya_社区 发布时间: 20171219
...e:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.tiledmap.js:165:20) at EventHandler.__proto.runWith (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:670:60) at Loader.__proto.event (file:///E:/EarlyChildhood/EARLY_GAME_001/bin/libs/laya.core.js:450:29) at Loader.__proto.endLoad (f...
来源: Laya_社区 发布时间: 20170124
... sp = project.drawsomething(20, 20+60*i, "#eeb9b3"); sp.on(Event.CLICK,this, onsp); Laya.stage.addChild(sp); } private function onsp(e:Event){ console.log("监听到按钮"+e.target); console.log((e.target.getChildAt(0) as ...
来源: Laya_社区 发布时间: 20170330
...Button; var my_clip:Clip=cell.getChildByName("my_clip") as Clip; my_btn.on(Event.CLICK,this,onBtnClick,["my_btn"]); my_clip.on(Event.CLICK,this,onClipClick,["my_clip"]); } private function onBtnClick(name:String):void { // TODO Auto Generated method stub trace(name); } private function onClipClick(n...
来源: Laya_社区 发布时间: 20161030
... var Browser = laya.utils.Browser; var Stat = laya.utils.Stat; var Event = laya.events.Event; var Sprite = laya.display.Sprite; Laya.init(800, 1030); Stat.show(0,0); var drawLayer = new Sprite(); Laya.stage.addChild(drawLayer); drawLayer.width = 800; drawLayer.height = 1030; drawLayer.o...
来源: Laya_社区 发布时间: 20160725
...ya.stage.bgColor = "#232628"; Stat.show(); this.setup(); } setup() { const Event = Laya.Event; var gap = 10; //创建一个Sprite充当音效播放按钮 let soundButton = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.s...
来源: Laya2.0_示例 发布时间: 20241123