大约有 22 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0039 秒)
... */ protected onCreate(): void { var self = this; // 纹理 var texture = self.$texture = pfUtils.getShareCanvas(); var bitmap = self.$bitmap = texture.bitmap; self.graphics.drawTexture(text...
来源: Laya_社区 发布时间: 20181114
....onclose=null; this.onerror=null; this._socket=new BK.WebSocket(url); var _self; _self=this; this._socket.onClose=function (ws){ if (_self.onclose !=null){ _self.onclose(); } } this._socket.onOpen=function (ws){ if (_self.onopen !=null){ _self.onopen(); } } this._socket.onError=function (ws){ if (_s...
来源: Laya_社区 发布时间: 20180328
...lic static showNativeGroup() { /* if (this.nativeGroup) { return; } */ var self = this; Laya.View.load(SdkUtil.sdkDomain + "sdkres/laya/native/NativeGroup.json", new Laya.Handler(this, function (group: Laya.View) { /* if (this.nativeGroup) { return; } */ self.nativeGroup = group; self.nigrop = new N...
来源: Laya_社区 发布时间: 20200630
... } if(this.heartbeatId) { // already in a heartbeat interval return; } var self = this; self.heartbeatId = Laya.timer.once(self.heartbeatInterval,self, function() { self.heartbeatId = null; self.send(obj); self.nextHeartbeatTimeout = Date.now() + self.heartbeatTimeout; self.heartbeatTimeoutId = self...
来源: Laya_社区 发布时间: 20180119
...,物体确定加包围盒了 onStart(): void { var self = this; this.hitResult=new Laya.HitResult(); Laya.Scene3D.load("res/LayaScene_game/Conventional/game.ls",Laya.Handler.create(null,function(scene3d){ // HelperAp...
来源: Laya_社区 发布时间: 20220506
...er.getComponent(Laya.RigidBody); cil.enabled=false; rig.enabled=false; var self:Laya.Sprite= this.owner as Laya.Sprite; var ni:Laya.Animation=new Laya.Animation(); self.addChild(ni); self.texture=null; ni.source='baozha/baozha_0.png,baozha/baozha_1.png,baozha/baozha_2.png,baozha/baozha_3.png,baozha/...
来源: Laya_社区 发布时间: 20190721
...件失效 Tween动画中的Sprite点击事件失效: 简单代码: var self = this; self.loserPrize.on(Laya.Event.MOUSE_DOWN,self,function(){ self.clickHanlder(); }) Laya.Tween.to(self.loserPrize, { y: Laya.Browser.clientHeight }, Math.random() * 1500); self.gameZone.addChild(self....
来源: Laya_社区 发布时间: 20180222
...需要精确到建模射线检测, 直接使用全局触控即可 var _self = this; document.addEventListener("mousedown",function(event){_self.onActDown(event);},false); document.addEventListener("mouseup",function(event){_self.onActUp(event);},false); document.addEventListener( 'touchstart', fu...
来源: Laya_社区 发布时间: 20180114
...函数实现 -10度 到 10 度之间来回摆动 tweenCircle = function (self) { var rotation = 0; if (self.rotation > 0) { rotation = -10; } else { rotation = 10; } Tween.to(self, { rotation: rotation, complete: Handler.create(this, this.tweenCircle, [self]), }, 2000, Ease.quadInOut); }
来源: Laya_社区 发布时间: 20161011
...ole.log('+++++++++++++++++++') console.log(_super); console.log(fooddata); self.foodList.dataSource = fooddata; //实例化角色容器 var foodBox = new Laya.Sprite(); //添加到舞台上 console.log(self.foodBox); Laya.stage.addChild(foodBox); self.foodBox = fooddata; console.log(self.foodBox);...
来源: Laya_社区 发布时间: 20181221