大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0116 秒)
Laya_社区(1162) Laya3.0_api(543) Laya2.0_api(297) laya_api(221) Laya2.0_文档(201) Laya_示例(139) Laya3.0_文档(117) Laya2.0_示例(109)
... { public btn_attack:Laya.Button; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码: import { ui } from "../ui/layaMaxUI"; export default class AttackView extends ui.AttackUI { constructor() { super(); this.btn_attack.on("clic...
来源: Laya_社区 发布时间: 20180926
预加载结束之后还是报lose skin private loadRes():void{ Laya.loader.load("./res/atlas/comp.atlas",Laya.Handler.create(this, this.onAssetLoaded),Laya.Handler.create(this, this.onLoading, null, false)); } private onLoading(progress: number): void { console.log("加载进度: " + progress); } ...
来源: Laya_社区 发布时间: 20180314
...6 唯一ID Returns number name get name(): string set name(value: string): void Inherited from AnimatorStateCondition.name Defined in laya/d3/component/Animator/AnimatorStateCondition.ts:73 名称 Returns string Inherited from AnimatorStateCondition.name Defined in laya/d3/component/Animator/Animato...
来源: Laya3.0_api 发布时间: 20231102
...in{ constructor() { Laya.init(600,400); this.hahaha(); } private hahaha(): void { var assets: Array<any> = []; assets.push({ url: "res/start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.onComplete)); } private onComplete(): void { var texture:Texture = Laya.l...
来源: Laya_社区 发布时间: 20170329
关于Timer延迟调用有一些不解 private function skill():void { Laya.timer.once(1500,this,finish); //Laya.timer.once(3000,this,finish); } private function skill():void { this.visible=false; } 假定这是一个简陋的人物隐身技能,蓄力1.5s后人物消失。 ...
来源: Laya_社区 发布时间: 20161216
...dMesh.boundingBox,cylinder.meshRender.boundingBox)); } private checkHit(): void { //从屏幕空间生成射线 this.point.elements[0] = Laya.MouseManager.instance.mouseX; this.point.elements[1] = Laya.MouseManager.instance.mouseY; this.camera.viewportPointToRay(this.point, this.ray); //射线检...
来源: Laya_社区 发布时间: 20180820
...DED,this,onLoaded); Laya.stage.addChild(mc); } private function onLoaded():void { mc.addLabel("label01",19); mc.addLabel("label02",39); mc.addLabel("label03",59); mc.on(Event.LABEL,this,onLabel);//运行到对应的帧数,会触发对应的标签 } private function onLabel(e:String):void//e: 返...
来源: Laya_社区 发布时间: 20170705
...e x0:number = 0; private y0:number = 0; constructor(){super();} onEnable():void{ this.x = this.x0; this.y = this.y0; Laya.timer.loop(20, this, this.frameWork); // 每 20 ms 执行一次 } private frameWork():void{ this.y = this.y0 + 10 * (this.n % 3); alert("move "); } }代码放在一个 Image 组...
来源: Laya_社区 发布时间: 20200203
...Worker(WorkerLoader.workerPath); this.worker.onmessage = function(evt:any):void { //接收worker传过来的数据函数 (this as any as WorkerLoader).workerMessage(evt.data); } } 回调函数this指向有问题 附件 : --> 2019-08-02 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...
来源: Laya_社区 发布时间: 20190802
...es/logo.png",Handler.create(this,onLoaded)); } private function onLoaded():void { img=new Image(); img.skin="res/logo.png"; Laya.stage.addChild(img); Laya.timer.once(500,this,onClick); //Laya.stage.on(Event.CLICK,this,onClick); } private function onClick():void { var htmlCanvas:HTMLCanvas=img.drawTo...
来源: Laya_社区 发布时间: 20170704