大约有 171 项符合查询结果, 库内数据总量为 30,897 项。 (搜索耗时: 0.0042 秒)
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite }) public sprite: Laya.Sprite; private spine: Laya.Spine2DRenderNode; private index: number = -1; //组件被激活后执行,此时所有节点和组件均已创建完毕,...
来源: Laya3.0_文档 发布时间: 20250214
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ViewStack }) public viewstack: Laya.ViewStack; @property({ type: Laya.Tab }) public tab: Laya.Tab; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方...
来源: Laya3.0_文档 发布时间: 20240910
...现打字效果等 /**古文脚本 */ export default class TextAncient extends Laya.Script { /** @prop {name:text, tips:"显示文本", type:String, default:"hello world"}*/ public text: string = "hello world"; /** @prop {name:color, tips:"字符串类型示例", type:String, default:"#0000ff"}*/ ...
来源: Laya_社区 发布时间: 20191103
...: 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_文档 发布时间: 20250103
... const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; con...
来源: Laya3.0_文档 发布时间: 20230303
.../被扔 dizziness = 'dizziness',//眩晕 } export default class RoleBase extends Laya.Script3D{ public nGrade:number = 0; public nSpeed:number = 5; public sprite:Laya.Sprite3D = null; public animator:Laya.Animator = null; public Init(){ this.sprite = this.owner as Laya.Sprite3D; this.animato...
来源: Laya_社区 发布时间: 20191026
...个窗口,都是这样,代码如下 export default class SettingDialog extends Laya.Dialog { constructor() { super(); this.loadScene('assets/scenes/dialogs/SettingDialog.scene'); } }{ "x":0, "type":"Dialog", "selectedBox":2, "selecteID":3, "searchKey":"Dialog", "props":{"width":1624,"sceneColor"...
来源: Laya_社区 发布时间: 20200417
...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_文档 发布时间: 20250214
...tpRequest; const { regClass } = Laya; @regClass() export class Network_GET extends Laya.Script { private hr: HttpRequest; private logger: Laya.TextArea; private text: Laya.Label = new Laya.Label(); onAwake(): void { this.initUI(); this.connect(); } /** * 初始化UI */ private initUI(): void { this....
来源: Laya3.0_文档 发布时间: 20250214
...nerated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on(Laya.Event.CLICK, this, this.onHurt); } onHurt(): void { this.bar.value = this.bar.value - 0.9; this.value.y = 35; this.va...
来源: Laya3.0_文档 发布时间: 20250214