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

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

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

...脚本方式实现,比如子弹脚本。 */ 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.lh" private ...

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

382. 项目入口说明 · LayaAir3.0文档 · LAYABOX [ 44%]

..."); }); const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 要注意的是,需保证这些代码所在的脚本文件是被场景中引用的,否则在发布版本时被消除项目中未使用的代码,那就无...

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

383. 微信小游戏渲染开放域卡顿处理 [ 44%]

...开放域代码请勿使用该类      */     export class WXBitmap extends Laya.Sprite {         private $viewName: string;         private $texture: Laya.Texture;         private $bitmap: any;         private $timer: lie.Timer;         public auto: boolean = true;    // ...

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

384. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 43%]

...ndler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var _path2:Sprite = new Sprite(); private var arr:Array = ; private var arr2:Array = ; ...

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

385. 抖音小游戏 · LayaAir3.0文档 · LAYABOX [ 43%]

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

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

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

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

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

387. 分享水波一个shader [ 43%]

... import BaseTexture = Laya.BaseTexture; export default class Test1Material extends BaseMaterial { public readonly MAIN_TEX:number = Shader3D.propertyNameToID("u_MainTex"); public readonly NOISE_TEX:number = Shader3D.propertyNameToID("u_NoiseTex"); public readonly Time:number = Shader3D.propertyNameT...

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

388. 物理引擎,我按照官方例子做的,不知道那里写错了,总是报这个错,大神帮我看下 [ 43%]

...rt laya.renders.Render; import laya.utils.Browser; public class Retitution extends Sprite { private const stageWidth:int = 800; private const stageHeight:int = 600; private var Matter:Object = Browser.window.Matter; private var LayaRender:Object = Browser.window.LayaRender; private var mouseConstrai...

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

389. 引用第三方JS模块 · LayaAir3.0文档 · LAYABOX [ 43%]

...astar"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private aStarInstance: AStarFinder; onStart() { console.log("Game start"); // 0表示通路,1表示障碍 let myMatrix = [ [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 1], [0, 0, 1, 1, 0, 1, 1, 0], ...

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

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

...搜索无果,想请教如何做才能实现。 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