大约有 41 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0033 秒)
... */ 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
...,物体确定加包围盒了 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
...x, owner.y);//设置爆炸动画的位置,让其跟随方块 owner.removeSelf();//删除方块自身节点对象 Laya.SoundManager.playSound("resources/sound/destroy.wav"); } } PhysicsGameMainRT.instance.addScore(1); } else if (other.label === "ground") { //只要有一个盒子碰到地板,则...
来源: Laya3.0_文档 发布时间: 20251010
...来自: 是要模仿镜头移动功能吗,这样可以 onAwake() { const self = this; self.gameObj = self.owner as Laya.Sprite; Laya.Physics.I.worldRoot = self.gameObj; this.cameraRect = new Laya.Rectangle(0, 0, 2000, 1000); this.gameObj.scrollRect = this.cameraRect; } onUpdate() { this.cameraRect...
来源: Laya_社区 发布时间: 20190214
...ON }, ... } // 装扮配置文件 makeupjson: any = { blusher: { cfg: "res/self/gltfMode/gltfBin/beautyResource/blusher/dress.json", tex: "res/self/gltfMode/gltfBin/beautyResource/blusher/beauty.png" }, eyelid: { cfg: "res/self/gltfMode/gltfBin/beautyResource/eyelid/dress.json", tex: "res/self/gltfM...
来源: Laya2.0_文档 发布时间: 20210715
...件失效 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
...igidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: any, contact: any): void { //如果被碰到,则移除子弹 this.owner.removeSelf(); } onUpdate(): void { //如果子弹超出屏幕,则移除子弹 if ((this.owner as Laya.Sprite).y < -10) { this.owner.removeSe...
来源: Laya3.0_文档 发布时间: 20251010
...函数实现 -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