大约有 168 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0067 秒)
...operty '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 config3D = new Laya...
来源: Laya_社区 发布时间: 20200903
...一路回车。 package name:项目名字; version: 版本号; description: 对项目的描述; entry point: 项目的入口文件; test command:项目启动的时候要用什么命令来执行脚本文件; git repository:如果要将项目上传到git中的话,那么就需...
来源: Laya3.0_文档 发布时间: 20250214
2.0版本可用的CameraMoveScript.ts 引擎源码:点这里仅仅给找不到这个文件,或者使用这个文件无效果的小伙伴,还原一个2.0,跟示例里效果一样的文件: /** * ... * @author */ export class CameraMoveScript extends Laya.Script { /** @private ...
来源: Laya_社区 发布时间: 20200707
...{ regClass } = Laya; @regClass() export class LightEffectDemo extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.FreeformLight2D; private rotateSpeed: number = 2; // 增加旋转速度 private scaleTime: number = 0; private scaleSpeed: number = 3; // 增加缩放速度 private...
来源: Laya3.0_文档 发布时间: 20250214
...lass, property } = Laya; @regClass() export class SpriteLight extends Laya.Script { @property({type: Laya.Sprite}) private spriteLight: Laya.Sprite; @property({type: Laya.Sprite}) private directLight: Laya.Sprite; @property({type: Laya.Sprite}) private background: Laya.Sprite; //组件被启用后...
来源: Laya3.0_文档 发布时间: 20250214
...义组件脚本的基础使用流程 自定义的组件脚本继承自Laya.Script类,定义了组件的事件方法和自身生命周期方法。 动图2-1演示了如何给Scene2D节点添加自定义的组件脚本。在属性设置面板中,点击增加组件->新建组件脚本,然后...
来源: Laya3.0_文档 发布时间: 20250103
...***136 • 2020-09-11 16:34 export default class Scene_Battle extends Laya.Script{ playerUnitReady:number; enemyUnitReady:number; private playerUnit:Laya.Animation[]; private enemyUnit:Laya.Animation[]; constructor(){ super(); Laya.stage.alignH= Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stag...
来源: Laya_社区 发布时间: 20200910
...代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件...
来源: Laya3.0_文档 发布时间: 20250103
... { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private tMap:Laya.TiledMap; onEnable() { //创建地图对象 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.designWidth, Lay...
来源: Laya3.0_文档 发布时间: 20240910
...例如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake()...
来源: Laya3.0_文档 发布时间: 20250103