大约有 350 项符合查询结果, 库内数据总量为 30,778 项。 (搜索耗时: 0.0042 秒)
Laya_社区(97) Laya_示例(78) Laya2.0_示例(68) Laya3.0_api(55) Laya2.0_文档(35) Laya3.0_文档(6) laya_api(6) Laya2.0_api(5)
...tage.on(Event.RESIZE, this, this.onResize); this.makeObject(0); for (var i:number = 0; i this.objs) { this.current = 0; } this.makeObject(this.current); } private makeObject(t):void { var xd:number; var i:number; switch (t) { case 0: for (i = 0; i this.tpoint1[i]) { this.tpoint1[i] = this.tpoint1[i]...
来源: Laya2.0_示例 发布时间: 20241118
...激活。 Returns boolean 在场景中是否激活。 alpha get alpha(): number set alpha(value: number): void Inherited from Text.alpha Defined in laya/display/Sprite.ts:1026 透明度,值为0-1,默认值为1,表示不透明。更改alpha值会影响drawcall。 Returns number Inherited from T...
来源: Laya3.0_api 发布时间: 20231115
...s, this.initRadioGroups)); } private initRadioGroups(): void { for (var i: number = 0; i < this.skins.length; ++i) { var rg: RadioGroup = this.createRadioGroup(this.skins[i]); rg.selectedIndex = i; rg.x = i * this.SPACING + this.X_OFFSET; rg.y = this.Y_OFFSET; } } private createRadioGroup(skin: stri...
来源: Laya_示例 发布时间: 20241118
...s, this.initRadioGroups)); } private initRadioGroups(): void { for (var i: number = 0; i < this.skins.length; ++i) { var rg: RadioGroup = this.createRadioGroup(this.skins[i]); rg.selectedIndex = i; rg.x = i * this.SPACING + this.X_OFFSET; rg.y = this.Y_OFFSET; } } private createRadioGroup(skin: stri...
来源: Laya2.0_示例 发布时间: 20241118
...动画最后一帧的索引值, */ private aniUrls(aniName:string,length:number):any{ var urls:any = []; for(var i:number = 0;i<length;i++){ //动画资源路径要和动画图集打包前的资源命名对应起来 urls.push("role/"+aniName+i+".png"); } return urls; } } new AtlasAniDemo(); ``` ...
来源: Laya2.0_文档 发布时间: 20210715
...tage.bgColor = "#232628"; this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height -...
来源: Laya2.0_示例 发布时间: 20241118
...tage.bgColor = "#232628"; this.setup(); } private setup(): void { var gap: number = 10; //创建一个Sprite充当音效播放按钮 var soundButton: Sprite = this.createButton("播放音效"); soundButton.x = (Laya.stage.width - soundButton.width * 2 + gap) / 2; soundButton.y = (Laya.stage.height -...
来源: Laya_示例 发布时间: 20241118
...动文本 private createTween():void{ //"LayaBox字符串总宽度" var w:number = 800; //文本创建的起始位置(>>在此使用右移运算符,相当于/2 用>>效率更高) var offsetX:number = Laya.stage.width - w >> 1; //显示的字符串 var demoString:string = "LayaBox"; var letterText:...
来源: Laya2.0_文档 发布时间: 20210715
...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"...
来源: Laya_示例 发布时间: 20241118
... Laya.WebGL; export class HelloLayabox { private txt: Text; private prevX: number = 0; private prevY: number = 0; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.AL...
来源: Laya2.0_文档 发布时间: 20210715