大约有 1,276 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0064 秒)
...2.0的版本开始,我用ts编写的相关内容,都要使用import和export吗? 项目分包后, 运行出错 as3 ,LayaAir下调试matter.js物理引擎出错。 播放声音出错,求指教 微信小游戏中访问带空格的文件出错 spine动画转换失败,加载错误:导出二进...
来源: Laya_社区 发布时间: 20171011
...加如下示例代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public btn: Laya.Button; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { thi...
来源: Laya3.0_文档 发布时间: 20251010
...onfigInfo from "../data/ConfigInfo"; import { ui } from "../ui/layaMaxUI"; export default class RuleDialog extends ui.scene.RuleDialogUI { private m_index: number = -1; private m_downValue: number = -1; constructor() { super(); this.list_rule.hScrollBarSkin = ""; this.list_rule.renderHandler = new L...
来源: Laya_社区 发布时间: 20170215
...dler = Laya.Handler; import Tween = Laya.Tween; import WebGL = Laya.WebGL; export class Interaction_Hold { private HOLD_TRIGGER_TIME: number = 1000; private apePath: string = "res/apes/monkey2.png"; //触发hold事件时间为1秒 private ape: Sprite; private isApeHold: Boolean; constructor() { // ...
来源: Laya2.0_示例 发布时间: 20260819
...件脚本 ```typescript //继承自AnimatorStateScript(动画状态脚本) export default class AnimatorStateScriptTest extends Laya.AnimatorStateScript { constructor() { super(); this._text = null; } get text() { return this._text; } set text(value) { this._text = value; } /** * 动画状态开始...
来源: Laya2.0_文档 发布时间: 20210715
...例代码如下所示: const { regClass, property } = Laya; @regClass() export class SpineTest extends Laya.Script { //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //加载预制体文件 Laya.loader.load("resources/spine3.8/boy/spineboy-pma_bake.lh").then((res) ...
来源: Laya3.0_文档 发布时间: 20251010
...件脚本 ```typescript //继承自AnimatorStateScript(动画状态脚本) export default class AnimatorStateScriptTest extends Laya.AnimatorStateScript { private _text:Laya.Text; constructor() { super(); } get text():Laya.Text { return this._text; } set text(value) { this._text = value; } /** * 动...
来源: Laya2.0_文档 发布时间: 20210715
...去修改源码,现在有插件开发,修改源码会有问题): export default class GifView extends Laya.Clip { /** *开始帧位置 * * @private * @memberof GifView */ private frameIndex = 0; /** ...
来源: Laya_社区 发布时间: 20201211
... = Laya.VSlider; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Slider { constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_...
来源: Laya_示例 发布时间: 20260819
...态加载脚本集: ``` const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { async onStart() { console.log("Game start"); // 手动加载脚本集 const isSuccess = await Laya.loader.loadPackage("GScript"); // "GScript" 为分包目录名称 console.log(`isSuc...
来源: Laya_社区 发布时间: 20251230