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

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

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

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

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

122. 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

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

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

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

124. 脚本组件继承于 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

125. 分享个用美术资源做位图文本的方法。。。 [ 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

126. 请问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

127. 分享一个Shader版的CoolDown实现 [ 58%]

...mport Shader = laya.webgl.shader.Shader;     export class coolDownShader extends Shader {         /**          * 当前着色器的一个实例对象。          */         public static shader: coolDownShader = new coolDownShader();         constructor() {             ...

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

128. 【LIST无法拖动】参照官方实例做的 [ 58%]

...ox; import Image = Laya.Image; import Text = Laya.Text; class Item extends Box {     public static WID: number = 400;     public static HEI: number =40;     private text_guanqia: Text;     private text_guanqia_info: Text;      private img: Image;    ...

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

129. 单选框组组件 · LayaAir3.0文档 · LAYABOX [ 58%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radiogr...

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

130. List翻页效果 [ 57%]

...fo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new Laya.Handler(this, this.updateIte...

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