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

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

211. 两个物体 ,如果在update里修改其中一个物体的rotationEuler,会触发另一个物体的onTriggerEnter回调 [ 49%]

...,建议用脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { private mat1: Laya.BlinnPhongMaterial; private newScene: Laya.Scene3D; private sMapRes = "remote/model/res/Conventional/map1.ls" private sBullRes = "remote/model/res/Conventional/bull....

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

212. 对游戏中各种控件字体样式使用“白鹭style”样式表 [ 49%]

...qianxiao * @Date: 2017/12/25 * @Time: 下午3:52 * @Desc: 字体样式 **/ class TextFormat implements ITextFormat { /** * 背景色 */ bgColor: string; /** * 是否加粗 */ bold: number; /** * 文本框背景色 */ borderColor: string; /** * 文本颜色 */ color: string; /** * 字体 */ font: str...

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

213. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 49%]

...*************************************************************************/ class DollGunRole extends GunRole{  public _box: GunBox; // toset: /** 飞行的范围, 用于计算飞行路径 */ private _fly_site:Site = new SiteEntity( 10, 10, -1, 400 );  public static _ani_cached:boolean = false;  /...

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

214. 2.x引擎项目升级说明 · LayaAir3.3 · 引擎文档 · LAYABOX [ 49%]

...一个类实现IResourceLoader接口,例如一个最简单的实现: class MyLoader { load(task:ILoadTask) { return task.loader.fetch(task.url, "json", task.createCallback()).then(data=> { let obj = /*解析data*/; return obj; }); } } 加载类里不需要考虑是单独加载,还是是批...

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

215. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 48%]

...s.outHitInfo.distance 一直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画...

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

216. Cannot read property 'rayCast' of undefined [ 48%]

Cannot read property 'rayCast' of undefined export default class indexscene extends Laya.Script { constructor(){ super(); this.rotation = new Laya.Vector3(0, 0.01, 0); this.point = new Laya.Vector2(); this.ray = new Laya.Ray(new Laya.Vector3(),new Laya.Vector3()); //1.开启第四个参数 let conf...

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

217. 单选框组容器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 48%]

...添加如下的示例代码,实现脚本控制RadioGroup: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完...

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

218. 分享,扩展Laya.Text组件实现简单的富文本 [ 48%]

...类的排版和渲染函数以实现自定义的富文本类型) */ export class Label extends Laya.Text { constructor() { super(); } private typeList = {}; //取出文本里面的关键字 private typeIndexList = ; //关键字所在文本的位置 private typeLines = ; //利用关键字重新划分...

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

219. 组件脚本的内置方法 · LayaAir3.3 · 引擎文档 · LAYABOX [ 47%]

...用等)自动执行相应的方法。 使用示例如下: const { regClass } = Laya; @regClass() export class NewScript extends Laya.Script { //被添加到节点后调用,和Awake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //组件被...

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

220. 描边Shader,使用了两个Pass [ 47%]

...工程请参阅附件 截图如下:   核心代码如下 export default class OutlineMaterial extends Laya.BaseMaterial { constructor() { super() var attributeMap = { 'a_Position': Laya.VertexMesh.MESH_POSITION0, 'a_Normal': Laya.VertexMesh.MESH_NORMAL0, 'a_Texcoord': Laya.VertexMesh.MESH_TEXTURE...

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