大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0124 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
...rivate txtInfo: Text; constructor() { 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 = (L...
来源: Laya_社区 发布时间: 20190421
... 2 人 cuixueying • 2016-01-07 16:04 private function init(e:Event=null):void { var sp1:Sprite=new Sprite(); sp1.graphics.beginFill(0xFF00FF); sp1.graphics.drawRect(100,100,200,200); sp1.graphics.endFill(); addChild(sp1); sp1.addEventListener(MouseEvent.CLICK,onSp1); var sp2:Sprite=new Sprite(); s...
来源: Laya_社区 发布时间: 20151102
...ics.endFill(); sp.mask=mask; addEventListener(Event.ENTER_FRAME,function():void { mask.x++; mask.cacheAsBitmap=true; sp.cacheAsBitmap=true; }); LayaAir环境下: 1、静态遮罩 Laya.init(600,400) var sp:Sprite=new Sprite(); sp.graphics.drawRect(0,0,200,200,'#FFFF00'); Laya.stage.addChild(sp); ...
来源: Laya_社区 发布时间: 20170207
...Laya.stage.bgColor = "#232628"; this.createApes(); } private createApes(): void { //显示两只猩猩 this.ape1 = new Sprite(); this.ape2 = new Sprite(); this.ape1.loadImage("../../res/apes/monkey2.png"); this.ape2.loadImage("../../res/apes/monkey2.png"); this.ape1.pivot(55, 72); this.ape2.pivot(55...
来源: Laya_示例 发布时间: 20260303
...ublic function arcTo(x1:Number, y1:Number, x2:Number, y2:Number, r:Number):void { if (mId != -1) { var tShape:IShape = VectorGraphManager.getInstance().shapeDic[this.mId]; if (mHaveKey ) { return; } } ....... }感觉这个...
来源: Laya_社区 发布时间: 20190708
...ArrayBuffer=function(arraybuffer,offset,length){ (offset===void 0)&& (offset=0); (length===void 0)&& (length=0); if (offset < 0 || length < 0)throw "writeArrayBuffer error - Out of bounds"; if (length==0)length=arr...
来源: Laya_社区 发布时间: 20180328
... .mc 资源路径数组 */ private loadedClips: string[] = []; onEnable(): void { this._animator = this.owner.getComponent<Laya.Animator2D>(Laya.Animator2D); // 1. 创建 Laya.Animation 并挂到角色节点 this.iceMonsterAni = new Laya.Animation(); this.owner.addChild(this.iceMonsterAni); th...
来源: Laya_社区 发布时间: 20251211
...Laya.stage.bgColor = "#232628"; this.createApes(); } private createApes(): void { var gap: number = 300; this.sp1 = new Sprite(); this.sp1.loadImage("../../res/apes/monkey2.png", 0, 0); this.sp1.pos((Laya.stage.width - gap) / 2, Laya.stage.height / 2); //设置轴心点为中心 this.sp1.pivot(55, 7...
来源: Laya_示例 发布时间: 20260303
...prite3D; private characterController: Laya.CharacterController; onAwake(): void { // 获取 角色控制器 组件并赋值给 characterController this.characterController = this.owner.getComponent(Laya.CharacterController); //设置出生点位置 this.characterController.position = new Laya.Vector...
来源: Laya3.0_文档 发布时间: 20251010
...有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { Laya.loader.load(this.skin).then( ()=>{ this.onColorPickerSkinLoaded(); } ); } private onColorPickerSkinLoaded(e: any = null): void { let colorPicker: Laya.ColorPicker = new Laya.ColorPicker(); colorPicker.selectedC...
来源: Laya3.0_文档 发布时间: 20251010