大约有 595 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0051 秒)
Laya_社区(200) Laya2.0_示例(114) Laya3.0_文档(99) Laya2.0_api(91) laya_api(48) Laya_示例(24) Laya2.0_文档(16) Laya3.0_api(3)
...的TestScene.scene文件 export default class GameUI extends Laya.Scene { constructor() { super(); //设置单例的引用方式,方便其他类引用 GameUI.instance = this; //关闭多点触控,否则就无敌了 Laya.MouseManager.multiTouchEnabled = false; //加载场景文件 this.loadScene(...
来源: Laya_社区 发布时间: 20190730
...暴露的属性入口中。在脚本文件中添加如下示例代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public btn: Laya.Button; //组件被激活后执行,此时所有节点和组件均已创建完毕...
来源: Laya3.0_文档 发布时间: 20251010
...) 方法二: 通过脚本中代码添加,示例代码如下所示: const { regClass, property } = Laya; @regClass() export class SpineTest extends Laya.Script { //组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { //加载预制体文件 Laya.loader.load("resourc...
来源: Laya3.0_文档 发布时间: 20251010
...。我布吉岛哎。我还是用的namespace。 export namespace mvc{ const commandMap = {}; export function registerCommand(){ //doSomething }; export interface ICommand{ excute(type:string, params:any):void; } } 2019-09-21 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折...
来源: Laya_社区 发布时间: 20180918
...t laya.utils.Handler; import laya.webgl.WebGL; public class Main { private const ApePath:String = "res/img/monkey1.png"; private var apeTexture:Texture; public function Main() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV =...
来源: Laya2.0_文档 发布时间: 20210715
...程吧。 2024-11-01 0 1 分享 微博 QZONE 微信 雄二 赞同来自: const { regClass, property } = Laya; @regClass() export class StartScene extends Laya.Script { onAwake(): void { Laya.timer.once(1000, this, () => { Laya.loader.loadPackage("common", "http://127.0.0.1:2840", (p) => { cons...
来源: Laya_社区 发布时间: 20241101
...All Classes | Index | Frames No Frames UIEventProperties | Methods | Constants Packagelaya.uiClasspublic class UIEventInheritanceUIEvent Event Object UIEvent 类用来定义UI组件类的事件类型。 Public Properties Hide Inherited Public Properties Show Inherited Public Properties Prope...
来源: laya_api 发布时间: 20170929
...持一致,比如对于Date声明为: interface Date { } interface DateConstructor { } const Date: DateConstructor; 这样应用可以针对引擎层的一些类通过修改prototype打一些便利性的补丁,同时扩展interface的定义,保证应用层typescript的类型识别。 2017-07-...
来源: Laya_社区 发布时间: 20170705
...赞同来自: 下面图片是手机上效果 这代码是设置横屏 const isMobile = Laya.Browser.onMobile; if (isMobile) { // 移动设备使用固定宽高比适配 Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya.stag...
来源: Laya_社区 发布时间: 20251023
...ing directory changed to /usr/local/lib/node_modules/layaair2-cmd fs.js:27 const { Math, Object } = primordials; ^ ReferenceError: primordials is not defined at fs.js:27:26 at req_ (/usr/local/lib/node_modules/layaair2-cmd/node_modules/natives/index....
来源: Laya_社区 发布时间: 20210420