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

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

121. Spine渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...下: const { regClass, property } = Laya; @regClass() export class Demo extends Laya.Script { spine: Laya.Spine2DRenderNode; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { // 加载Spine动画数据资源(json文件),...

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

122. 这种进度条怎么实现? [ 59%]

...llen 赞同来自:  import Sprite = Laya.Sprite export default class Test extends Sprite{ public DEF_SIZE: number = 200 public CIRCLE_WIDTH: number = 20 public $circleSprite: Sprite = new Sprite() public startY: number = -90 constructor() { super() this._init() } private _init() { this.cacheAs = "b...

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

123. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 59%]

...rt laya.display.Sprite; import laya.maths.Rectangle; public class CdSprite extends Sprite { public static const START:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:Rectangle = new Rectangle(0,0,BarCell.WID,BarCell.WID); pri...

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

124. 继承自Laya.BaseMaterial并且自定义Shader的的自定义材质如何设置透明渲染 [ 59%]

...搜索无果,想请教如何做才能实现。 export default class CMat extends Laya.BaseMaterial { public static _mainTex : number; public static _mainCol : number; inited : boolean = false; constructor() { super(); if(!this.inited) { CMat._mainTex = Laya.Shader3D.propertyNameToID("u_MainTex"); ...

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

125. 两个移动的简单物体 onTriggerEnter 无法触发 (有悬赏) [ 58%]

...无法触发onTriggerEnter,   export default class BulletControlTrigger extends Laya.Script3D { constructor(){ super(); }  /** * 开始触发时执行 * 此方法为虚方法,使用时重写覆盖即可 */ onTriggerEnter(other){ console.log("onTriggerEnter"); };  onTriggerStay(other){ console...

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

126. cannot read property '1'of null [ 58%]

...grandSon继承自son这种情况?如果存在的话在脚本中添加 //extends Laya.Script的注释试试 2022-01-06 0 2 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 173*****785 相关问题 laya2.0加载3d场景报错Uncaught TypeError...

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

127. 脚本组件继承于 Laya.Script。 其中的_update方法,多长时间会调用一次? 可以设置调用时间吗? [ 58%]

...nent3D</code> 类用于创建组件的父类。 */ class Component3D extends laya.events.EventDispatcher implements laya.d3.core.render.IUpdate { protected static _uniqueIDCounter: number; protected _id: number; protected _cachedOwnerLayerMask: number; protected _cachedOwnerEnable: boolean; pr...

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

128. 分享个资源加载的方法,类似白鹭的加载方式 [ 58%]

...似白鹭的加载方式 第一次发,不足之处还请见谅 class RES extends Laya.EventDispatcher{ // 资源组 public static groups: any; // 资源 public static resources: any; // 完成加载资源配置文件 public static ONLOADEDRESJSON: string = "onLoadedResJson"; // 资源配置文件...

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

129. 分享个用美术资源做位图文本的方法。。。 [ 58%]

...eMain(); 运行效果基本上还行, /* * 位图字体; */ class BPFont extends Laya.Sprite{ // 文本内容 private _text: string; // json数据 private _jsonData: any; // 图片数据 private _imageData: Laya.Texture; // 文本字间距 private _padding: number = 0; // 所有元素; private c...

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

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

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

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