大约有 1,237 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0059 秒)
Laya_社区(706) Laya_示例(137) Laya2.0_文档(123) Laya2.0_示例(116) Laya3.0_文档(76) Laya3.0_api(39) laya_api(29) Laya2.0_api(11)
...lic class Mod extends EventDispatcher { public function Mod() { super(); } private static var _instance:Mod; public static function get index():Mod { return _instance ||= new Mod(); } public function init():void { Mod.event("aaaa"); } } }监听:Mod.on("aaa",this,onFunciton) 2016-12-19 0 0 分享 ...
来源: Laya_社区 发布时间: 20161218
...aa.json",new Rectangle(0,0,1200,720),Handler.create(this,loadMap_1_OK)); } private function loadMap_1_OK():void{ console.log("地图三加载完成"); } } } 2017-01-05 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 2 个回...
来源: Laya_社区 发布时间: 20170105
... 与内容相关的链接 提交 1 个回复 cuixueying 赞同来自: Todo private function mouseMove(e:*=null):void { //移动地图视口 tiledMap.moveViewPort(mX - (Laya.stage.mouseX - mLastMouseX), mY - (Laya.stage.mouseY - mLastMouseY)); }控制好moveViewPort的视图X和视图Y就可以了,...
来源: Laya_社区 发布时间: 20170119
...鼠标点击的位置 @property({ type: Laya.Sprite }) public hit: Sprite; private _temp: Sprite; private _allAgent: Nav2DAgent[] = []; private findCompents(lists: any[], sprite: Sprite, componentType: typeof Component) { let comp = sprite.getComponent(componentType); if (comp != null) { lists.push(...
来源: Laya3.0_文档 发布时间: 20251010
... public DoFlash ():void { Laya.timer.once(700, this, this.FlashTween); } private FlashTween ():void { this.hand.scale(2, 2); this.hand.alpha = 1 Tween.to(this.hand, {scaleX:1, scaleY:1, alpha:1}, 300, null, Laya.Handler.create(this, this.DoFlash)); } 循环Tween 缩放一个图片, 从scale=2 缩小...
来源: Laya_社区 发布时间: 20211109
...========================================================= class Game{ private ProtoBuf:any = Browser.window.dcodeIO.ProtoBuf; ... } err code: ============================================================ TypeError: Cannot read property 'ProtoBuf' of undefined at new Game (file:///D:/...
来源: Laya_社区 发布时间: 20170222
...JSON }, ] Laya.loader.load(assets, Handler.create(this, this.onLoaded)); } private onLoaded():void { this.createView(Laya.loader.getRes("view/MyView.json")); } } 因为加载是异步的,很有可能在加载过程中,用户或者其他行为逻辑已经反复开关这个界面多次了。是否...
来源: Laya_社区 发布时间: 20180113
...lt resources-Capsule.lm",Laya.Handler.create(this,this.onCreateComplete)); private onCreateComplete():void { var mesh:Laya.Mesh = Laya.loader.getRes("LayaScene_layabox/Library/unity default resources-Quad.lm"); var meshSprite3D:Laya.MeshSprite3D = new Laya.MeshSprite3D(mesh); var mesh2:Laya.Mesh = L...
来源: Laya_社区 发布时间: 20180719
...de为message-------- socket.on(Event.MESSAGE,this,this.onMessageReceived); private onMessageReceived(msg:any):void { //received data from server var byte:Byte=new Byte(); byte.writeArrayBuffer(msg); byte.pos=0; byte.endian=Socket.BIG_ENDIAN; //拆包开始 :依旧是length id buffer var length:num...
来源: Laya_社区 发布时间: 20171113
...Handler); this.socket.on(Laya.Event.ERROR, this, this.errorHandler); private openHandler(event: any = null): void { //正确建立连接; this.gameInfo.info("Connected !"); // 显示已经连接 } 2018-05-10 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到...
来源: Laya_社区 发布时间: 20180510