大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0059 秒)
... const { regClass, property } = Laya; @regClass() export class lightTest extends Laya.Script { declare owner: Laya.Sprite; @property({ type: Laya.Sprite }) light1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh2: Laya.Sprite; private light1Ren...
来源: Laya3.0_文档 发布时间: 20251010
...发者可将脚本添加到2D场景中查看效果 */ export class Script extends Laya.Script { declare owner : Laya.Scene; area2D: Laya.Area2D; camera2D: Laya.Camera2D; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.creat...
来源: Laya3.0_文档 发布时间: 20251010
...直等于-1? -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniCo...
来源: Laya_社区 发布时间: 20171113
...: /** * TypeScript语言的3D脚本示例 */ export default class TSDemo extends Laya.Script3D { constructor() { super(); } } 2D脚本与3D脚本不要混用,如果是用IDE创建的脚本模板,需要将继承的2D脚本类(Laya.Script)改为3D脚本类(Laya.Script3D), 添加物理...
来源: Laya3.0_文档 发布时间: 20251010
...: 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_文档 发布时间: 20251010
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { declare owner: Laya.Image; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //需要先加载图集再使用,注意,图集要放到resources目录下或者在构建发...
来源: Laya3.0_文档 发布时间: 20251128
...下: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片的路径 } onStart() { Laya.Stat.show(0, 0); //性能面...
来源: Laya3.0_文档 发布时间: 20251010
...下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.AnimatorState2D) { ......
来源: Laya3.0_文档 发布时间: 20251010
...onst { regClass, property } = Laya; @regClass() export class LightOccluder extends Laya.Script { private spotLight: Laya.Sprite = new Laya.Sprite(); private background: Laya.Sprite = new Laya.Sprite(); private lightOccluder: Laya.Sprite = new Laya.Sprite(); private backgroundTexture: string = "resou...
来源: Laya3.0_文档 发布时间: 20251010
... 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_文档 发布时间: 20251010