• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 2,789 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0116 秒)

1591. 2.0 beta UI Button无法获取 [ 67%]

... { 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

1592. 预加载结束之后还是报lose skin [ 67%]

预加载结束之后还是报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

1593. laya.d3.component.animator.AnimatorStateTriggerCondition_API3.0 [ 67%]

...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

1594. 图集打包后使用Texture不显示,项目整个已经传上来了 [ 67%]

...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

1595. 关于Timer延迟调用有一些不解 [ 67%]

关于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

1596. 有关Laya3D碰撞检测疑问 [ 67%]

...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

1597. 分享:SWF LABEL标签的使用! [ 67%]

...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

1598. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 67%]

...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

1599. workerLoader问题 [ 67%]

...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

1600. image.drawToCanvas方法获取的一直是空的png [ 67%]

...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