大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0047 秒)
...,就可以获取到觖发信息了 export default class PlayerController extends Laya.Script3D 2020-07-29 0 0 分享 微博 QZONE 微信 不懂就问 赞同来自: isKinematic=true,这个为true是没有碰撞检测的 2020-07-29 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被...
来源: Laya_社区 发布时间: 20200728
... const { regClass, property } = Laya; @regClass() export class SpotLight extends Laya.Script { @property({ type: Laya.Sprite }) private spotLight: Laya.Sprite; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { this.setSpotLight(); } // 创建聚光灯 setSpotLight(): ...
来源: Laya3.0_文档 发布时间: 20251010
...: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (r...
来源: Laya3.0_文档 发布时间: 20241014
...s脚本,添加如下代码,设置初始化Steam的接口, interface IExtendLib { // 初始化Steam initializeSteam(): number; // 返回1表示成功,0表示失败 } export const extendLib: IExtendLib = Laya.importNative("steam_demo.dll"); 然后在Scene2D上新建一个组件脚本,当点...
来源: Laya3.0_文档 发布时间: 20251010
...: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (r...
来源: Laya3.0_文档 发布时间: 20251105
..."); }); const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { console.log("Game start"); } } 2.2 场景的脚本说明 前面讲了项目的入口, 本小节简述一下场景的脚本。场景的脚本主要是两类, 一类是自定义的组件脚...
来源: Laya3.0_文档 发布时间: 20251103
...,IDE F8编译时也不通过 代码: export default class Index extends Laya.Script { /* @prop {name: speed, tips: "速度", type: Number, default: 10} */ constructor() { super(); } onAwake() { console.log("...
来源: Laya_社区 发布时间: 20191227
... 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_文档 发布时间: 20251010
...现打字效果等 /**古文脚本 */ 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_文档 发布时间: 20251010