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

大约有 196 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0044 秒)

1. Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent [ 100%]

Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent PhysicsCollider这个组件我只添加了一次,当我按住键盘在点击鼠标的时候,就会有这个错误。说我组件重复添加。我不知道,是你们有默认的键盘事件影响的,还是什么问...

来源: Laya_社区 发布时间: 20200505

2. _calculateCacheRect函数有bug [ 94%]

...pRect;                 tRec.width = tRec.width + CacheStyle.CANVAS_EXTEND_EDGE * 2;                 tRec.height = tRec.height + CacheStyle.CANVAS_EXTEND_EDGE * 2;                 tRec.x = tRec.x - sprite.pivotX;                 tRec.y = tRec.y - sprite.pivotY;     ...

来源: Laya_社区 发布时间: 20210615

3. @regClass编译报错! [ 93%]

...return result;   };    // src/MachineCtrl.ts   var MachineCtrl = class extends CtrlBase {     constructor() {       super();     }   };   __name(MachineCtrl, "MachineCtrl");    // src/funcccccc.ts   var funzzzzz = class {     constructor() {     }     static run(callBack, calle...

来源: Laya_社区 发布时间: 20230608

4. 定时器 · LayaAir3.0文档 · LAYABOX [ 91%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { //60帧后,图片的透明度变为0.5 Laya.timer.frameOnce(60, this, () => { this.Image.alpha = 0.5; }) } } 1.2 定时重复执行 (基于帧率) Laya.timer.frameLoop,定...

来源: Laya3.0_文档 发布时间: 20230724

5. js继承模式 [ 88%]

...type.init = function() { console.log(this); }; return Class; })(); } var __extends = (this && this.__extends) || function(d, b) { for (var p in b) { (b.hasOwnProperty(p)) && (d[p] = b[p]); } function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.pro...

来源: Laya_社区 发布时间: 20170619

6. ts继承后,代码压缩的问题 [ 86%]

...uglify-js对代码进行压缩有,会有很多重复的一下语句 var __extends = this && this.__extends || function() { var extendStatics = Object.setPrototypeOf || { __proto__: [] }instanceof Array && function(d, b) { d.__proto__ = b } || function(d, b) { for (var p in b) if (b.h...

来源: Laya_社区 发布时间: 20171212

7. 3D变换 · LayaAir3.0文档 · LAYABOX [ 86%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite3D }) public cube: Laya.Sprite3D; // 平移距离 private translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); constructor() { super(); } /** * 组件被激活后执行,此...

来源: Laya3.0_文档 发布时间: 20230821

8. 插件开发说明 · LayaAir3.0文档 · LAYABOX [ 85%]

... 下面是一个推荐做法: //Script.ts @Laya.regClass() class Script extends Laya.Script { wantToUseNode() { EditorEnv.scene.runScript("TestSceneScript.visitNode"); } } //TestSceneScript.ts import fs from "fs"; //注意是IEditorEnv.regClass,不是Laya.regClass!! @IEditorEnv.regClass() class ...

来源: Laya3.0_文档 发布时间: 20240918

9. 绘制图形的BUG [ 84%]

... { import laya.display.Sprite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正...

来源: Laya_社区 发布时间: 20170124

10. 分包后, 资源加载问题 [ 84%]

...e.log("kk22") var View=laya.ui.View; console.log("kk3") //class loading100 extends laya.display.Sprite var loading100=(function(_super){ console.log("kk4") function loading100(){ loading100.__super.call(this); this.load=new loadingUI(); this.addChild(this.load); } console.log("kk5") __class(loading1...

来源: Laya_社区 发布时间: 20170725