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

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

141. TypeScript语法问题,泛型 [ 61%]

...gle.instance } constructor(){ Single.instance =new Single(); } } class Car extends Single { constructor() { super(); } } var inst = Car.GetInstance<Car>() 2018-06-21 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 …… 相关问...

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

142. LAYA的POOL有毒 [ 60%]

LAYA的POOL有毒 class A extends B 如果用createByClass(B)创建一个B的实例出来,因为找不到__className属性,会创建一个_$gid=XXX到B里面, 这时候如果创建一个A出来,会直接用XXX去找到这A的父级,也就是B去创建实例...应该是原型链机制 如图:GuaJi_p...

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

143. 显示文本组件 · LayaAir3.4 · 引擎文档 · LAYABOX [ 60%]

...const { regClass, property } = Laya; @regClass() export class LabelControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.Label } ) public lab: Laya.Label; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此...

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

144. 如何才能生成scene配套的代码 [ 60%]

...i.test { import laya.ui.*; import laya.display.*; public class TestSceneUI extends Scene { public var scoreLbl:Label; public var tipLbll:Label; override protected function createChildren():void { super.createChildren(); loadScene("test/TestScene"); } } } 2018-10-24 添加评论 免费帖 --> 分享 ...

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

145. 发布选压缩JS后,泛型方法报错 [ 60%]

...错 不压缩JS,代码正常运行。 World 类里的 GetGlobal<T extends Component>(C: new () => T):T 附件里有demo 去掉了图片资源。 附件 : --> 2019-07-09 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提...

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

146. 天空穹不显示 [ 60%]

天空穹不显示 export default class GameUI extends Laya.Scene { constructor() { super(); //加载场景文件 this.loadScene("test/TestScene.scene"); //添加3D场景 var scene = Laya.stage.addChild(new Laya.Scene3D()); //添加照相机 var camera = (scene.addChild(new Laya.Camera(0, 0.1, 100)...

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

147. Laya2.0 动画Animator如何监听播放完成 [ 60%]

...mationDefine from "../AnimationDefine";  export default class AttackState extends Laya.AnimatorStateScript {  animator:Laya.Animator;  onStateEnter(): void {  }  onStateExit(): void { if(this.animator) { this.animator.crossFade(AnimationDefine.IDLE,0.5,0,0); } }  onStateUpdate(): void {   } }...

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

148. runTime使用(TypeScript-IDE篇(TS)-组件化开发相关) [ 60%]

...``typescript /* ImageRunTime逻辑类 */ export default class ImageRunTime extends Laya.Image{ public scaleTime:number = 100; constructor() { super(); //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮。 this.on(Laya.Event.MOUSE_DO...

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

149. UI-Tree [ 60%]

..."Box", "props": {"name": "render", "right": "0", "left": "0"}}; class Item extends Box { constructor() { super(); this.right = 0; this.left = 0; let selectBox = new Clip("res/ui/tree/clip_selectBox.png", 1, 2); selectBox.name = "selectBox"; // 设置 selectBox 的name 为“selectBox”时,将被...

来源: Laya2.0_示例 发布时间: 20260303

150. HtmlDivElement宽度设置错误 [ 60%]

...是以文本宽度来显示的 示例代码export default class HtmlTest extends Laya.Sprite { constructor() { super(); this.init(); } init() { this.bg = new Laya.Sprite(); this.bg.graphics.drawRect(0, 0, 200, 200, '#ccc'); this.addChild(this.bg); this.htmlTxt = new Laya.HTMLDivElement(); this.htmlT...

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