大约有 446 项符合查询结果, 库内数据总量为 30,782 项。 (搜索耗时: 0.0046 秒)
...: 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_文档 发布时间: 20241014
...直等于-1? -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniCo...
来源: Laya_社区 发布时间: 20171113
...+ index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: s...
来源: Laya2.0_文档 发布时间: 20210715
... 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
...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
...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_文档 发布时间: 20241014
...搜索无果,想请教如何做才能实现。 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
...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
...flash.display.StageScaleMode; import flash.events.Event; public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); this.stage.s...
来源: Laya_社区 发布时间: 20151106
..."); }); const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 要注意的是,需保证这些代码所在的脚本文件是被场景中引用的,否则在发布版本时被消除项目中未使用的代码,那就无...
来源: Laya3.0_文档 发布时间: 20241014