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

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

201. 请问js怎么触发按钮的onclick事件,按教程的写,触发不知道为什么。 [ 60%]

...按钮绑定一个btn1.js 我在这样写的   export default class btn1 extends Laya.Script { constructor(){ alert("1"); //执行后这里触发了 super();} onEnable(){ alert("2"); //执行后这里触发了 } onclick(){ alert("3"); //执行后点击按钮这里没触发,不知道为什么 //La...

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

202. Sprite3D添加组件或脚本(ActionScript-3D基础(AS3)-LayaAir3D之精灵) [ 60%]

...ort laya.d3.core.Sprite3D; import laya.d3.math.Vector3; class MonkeyScript extends Script3D { private var rotation:Vector3 = new Vector3(0, 0.03, 0); override public function onAwake():void { trace("onAwake"); } override public function onStart():void { trace("onStart"); } override public function o...

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

203. mac的2.0.0 beta3版本场景添加脚本为组件报错 [ 60%]

...为组件报错 报一个窗口提示:    export default class Start extends Laya.Script { constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,次方法只执行一次 */ onAwake(): void {  }  /** * 第一次执行update之前执行,只...

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

204. UI-Tree [ 60%]

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

来源: Laya_示例 发布时间: 20260303

205. LAYABOX读取贴图的时候 是否可以更改 列如 UNITY 里的 Filter Mode 采样模式 [ 60%]

...关的链接 提交 1 个回复 Laya_Aaron 赞同来自: class BaseTexture extends Bitmap { static WARPMODE_REPEAT: number = 0; static WARPMODE_CLAMP: number = 1;  /**寻址模式_重复。*/ static FILTERMODE_POINT: number = 0; /**寻址模式_不循环。*/ static FILTERMODE_BILINEAR: number = 1;...

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

206. IDE时间轴动画帧数乱序导致的bug [ 60%]

IDE时间轴动画帧数乱序导致的bug class FrameAnimation extends AnimationBase { constructor() { super(); if (FrameAnimation._sortIndexFun === null) { FrameAnimation._sortIndexFun = MathUtil.sortByKey("index", false, true); } }   FrameAnimation初始化时_sortIndexFun 方法没有被赋值...

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

207. 性能测试-卡通人物2 [ 60%]

... % 60 === 0) { this.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { ...

来源: Laya_示例 发布时间: 20260303

208. 为什么全局属性赋值后,在另外个函数中调用会自动变成undefined [ 60%]

...个函数中调用会自动变成undefined public class MainPageController extends Scene {                  public var camera:Camera;                  public function MainPageController(){             super();             Laya.stage.scaleMode =...

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

209. 如何自定义一个类实现类似List的功能的Grid [ 60%]

...实现类似List的功能的Grid,下面是List的官方代码 class List extends Box implements IRender, IItem { /**改变 <code>List</code> 的选择项时执行的处理器,(默认返回参数: 项索引(index:number))。*/ selectHandler: Handler; /**单元格渲染处理器(...

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

210. 在Unity中设置动画事件(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 60%]

...这里是随便取的名。 ```typescript export default class SceneScript extends Laya.Script3D { constructor(){ super(); //用于表现的方法 this.showMsgFunc = null; } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg() { console.log("ShowMsg"); th...

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