大约有 357 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0053 秒)
Laya_社区(99) Laya_示例(78) Laya2.0_示例(68) Laya3.0_api(55) Laya2.0_文档(35) Laya3.0_文档(11) laya_api(6) Laya2.0_api(5)
...onSpriteClick); } private onSpriteClick(e: Event): void { var randomAngle: number = Math.random() * 180; //发送自定义事件 this.sp.event(Interaction_CustomEvent.ROTATE, [randomAngle]); } // 触发自定义的rotate事件 private onRotate(newAngle: number): void { Tween.to(this.sp, { "rotation"...
来源: Laya2.0_示例 发布时间: 20260303
...WF{ private SWFPath:string = "h5/res/Map11.swf"; private MCWidth:number = 760; private MCHeight:number = 650; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(760,650, WebGL); Laya.stage.frameRate = Stage.FRAME_SLOW; Stat.show(0,0); this.createMovieClip(); } private creat...
来源: Laya_社区 发布时间: 20171103
...=Socket.BIG_ENDIAN; //拆包开始 :依旧是length id buffer var length:number=byte.getUinit32(); var id:number=byte.getUint32(); //已经读完了length id,剩下的字节就是需要protobuf来decode成一个message了,怎么写?我写的都报错了 this._protoMsg.decode(xxxxxx);//xxxxx...
来源: Laya_社区 发布时间: 20171113
...tionTemplet.load(this.skinAniUrl[0]); skinAni.player.play(); } for (var i: number = 0, n: number = spirit3D._childs.length; i < n; i++) this.addSkinComponent(spirit3D._childs[i]); } //遍历节点,播放动画 public playSkinAnimation(spirit3D: Laya.Sprite3D, index: number): void { if (spirit3D inst...
来源: Laya_示例 发布时间: 20260303
...age.bgColor = "#232628"; this.setup(); } private setup(): void { var vGap: number = 100; this.button1 = this.createButton("点我3秒之后 alpha - 0.5"); this.button1.x = (Laya.stage.width - this.button1.width) / 2; this.button1.y = (Laya.stage.height - this.button1.height - vGap) / 2; Laya.stage.a...
来源: Laya2.0_示例 发布时间: 20260303
...derTexture,subRendertexture); //设置模糊的参数 var downSampleFactor:number = 2; var downSampleWidth:number = viewPort.width/downSampleFactor; var downSampleheigh:number = viewPort.height/downSampleFactor; var texSize:Vector4 = new Vector4(1.0/viewPort.width,1.0/viewPort.height,viewPort.width,...
来源: Laya_社区 发布时间: 20201218
... * 游戏初始化配置; */ export default class GameConfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static alignV:string="top"; static alignH:string="left"; static startScene:any="mainscene.scene"; static sceneRoot:...
来源: Laya_社区 发布时间: 20181014
...etInterval( this.addball.bind( this ),500); } public addball(){ for( let i:number = 0 ; i < 6; i++){ let ball = this.getObj(); ball.x = (i%6) *150 ball.y = -200 Laya.Tween.to( ball,{y: 1500 } ,5000,Laya.Ease.linearOut,Laya.Handler.create(this,this.removeball,[ball])); Laya.stage.addChild( ball );...
来源: Laya_社区 发布时间: 20180226
...(event:Event):void { this.bg.y = 180; alert("11111111111111") var desWidth:Number; var desHeight:Number; //获取窗口显示区的宽度。 desWidth=window.innerWidth; //获取窗口显示区的高度。 desHeight=window.innerHeight if(desHeight!=this.sourceHeight) { this.bg.y = 180; } else { this....
来源: Laya_社区 发布时间: 20170322
...r(this, this.onChange); Laya.stage.addChild(vs); } private onChange(value: Number): void { console.log("滑块的位置:" + value); } } } new laya.UI_Slider();package { import laya.display.Stage; import laya.ui.HSlider; import laya.ui.VSlider; import laya.utils.Handler; import laya.webgl.WebGL; pu...
来源: Laya_示例 发布时间: 20260303