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

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

211. 聊天消息对话框中new一个HTMLDivElement 报错"Illegal constructor",请问这个该怎么处理? [ 65%]

...lass ChatLineView extends Laya.Box{ textfield : any = null; constructor(){ super(); // this.initLineView(); } public initLineView (data) : void { this.pos(0,0); console.log(this.textfield); if (this.textfield == null) { var stextfield = new HTMLDivElement(); } } 2018-07-09 添加评论 免费帖 -->...

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

212. 动画状态脚本(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 65%]

...xtends Laya.AnimatorStateScript { private _text:Laya.Text; constructor() { super(); } get text():Laya.Text { return this._text; } set text(value) { this._text = value; } /** * 动画状态开始时执行。 */ onStateEnter() { console.log("动画开始播放了"); this._text.text = "动画状态:...

来源: Laya2.0_文档 发布时间: 20210715

213. 分享一个自己做的游戏公告功能,跑马灯效果 [ 65%]

...                      </span>" constructor() { super() this.width = 1200 this.height = 55 this.visible = false this.pos(565,150) this._createHorn() this._createBg() this._createView() this.on(Laya.Event.UNDISPLAY,this,this.stop) this.on(Laya.Event.DISPLAY,this,this.play) ...

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

214. drawToCanvas绘制显示不全 [ 65%]

...ault class TestView extends TestViewUI {     constructor() {         super();     }     onAwake() {         this.nativeImg = new Image();         let style = this.nativeImg.style;         style.position = 'absolute';         style.visibility = 'hidden';         style.zI...

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

215. 最新版本绘制100x100个sprite ios不能显示 [ 65%]

...*/ function GameMap(){ this.MapRowNum = 100; this.MapColNum = 100; GameMap.super(this); this.init(); } Laya.class(GameMap, "GameMap", laya.display.Sprite); var _proto = GameMap.prototype; _proto.init = function(){ var boxSp = new laya.display.Sprite(); // boxSp.cacheAsBitmap = true; for(var i = 0; i...

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

216. 进度条组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 64%]

...tends Laya.Script { private progressBar: Laya.ProgressBar; constructor() { super(); } onAwake(): void { // 加载进度条资源,图片资源来自“引擎API使用示例” Laya.loader.load(["resources/res/ui/progressBar.png", "resources/res/ui/progressBar$bar.png"]).then(() => { // 创建进...

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

217. timer无法执行 [ 64%]

...接调用的没有问题的,可以正常执行,但是 constructor() { super(); //添加3D场景 this.onAwake(); //加载camera和light this.onStart(); //加载地面 this.loadGround(); //加载墙面 this.loadwall(); this.loopShoot(); } public loopShoot(): void{ Laya.timer.loop(1000, this, this....

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

218. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 64%]

...ndlordAni{ return this.instance(DdzLandlordAni); }  public constructor(){ super(); this.initTemplet(); }  public static destoryInstance(){ if(this.mInstance){ (<DdzLandlordAni>this.mInstance).destory(); this.mInstance = null; } }  public initTemplet(){ this.mFactory = new Laya.Templet(); th...

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

219. layaair 2.0 在构造函数中获取基类的组件,报错说未定义。 [ 64%]

... export default class GameLoading extends ui.gamoloadingUI{ constructor(){ super(); this.PB.changeHandler = new Laya.Handler(this,this.onChange); } } 基类中明确有PB变量,是进度条。此处构造函数中设置事件报错,说PB未定义,但是放在onEnable中是正常的,难道在...

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

220. UNITY导出的模型旋转不了 [ 64%]

...; })(this); class BoxControlScript extends Laya.Script3D { constructor() { super(); this.obj = null; this.rotation = new Laya.Vector3(0, 1, 0); } /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake() { //得到3D对象 th...

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