大约有 481 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0042 秒)
复杂UI类卸载 class GameUI extends View{ container:Laya.Sprite; img1:Laya.Image; anim1:Laya.Animation; ... }, 类似这样的复杂UI类,里面包含了各种类型的组件,当需要卸载GameUI类的时候,gameUI.removeSelf();gameUI.destroy(true);gameUI = null ,用这种方式是否可行...
来源: Laya_社区 发布时间: 20161212
...ya_Yan 赞同来自: 是不是多层继承,是的话在脚本内添加 //extends Laya.Script的注释就可以了 2021-12-24 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要回复问题请先登录 发起人 峻郡 相关问题 看了其他引擎才发现 LAYA 真的太...
来源: Laya_社区 发布时间: 20211224
... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(): void { let opendata = new...
来源: Laya3.0_文档 发布时间: 20251010
...; import Handler = Laya.Handler; import Loader = Laya.Loader; class TestUI extends game.ui.test.TestPageUI { constructor() { super(); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Laya.CLICK, this, this.onBtnClick); this.btn2.on(Laya.CLICK, this, ...
来源: Laya_示例 发布时间: 20251130
...; import Handler = Laya.Handler; import Loader = Laya.Loader; class TestUI extends game.ui.test.TestPageUI { constructor() { super(); //btn是编辑器界面设定的,代码里面能直接使用,并且有代码提示 this.btn.on(Laya.CLICK, this, this.onBtnClick); this.btn2.on(Laya.CLICK, this, ...
来源: Laya2.0_示例 发布时间: 20200319
...3); input.inputElementYAdjuster = 1; return input } } class ListItemRender extends Laya.Box { constructor() { super(); const Label = Laya.Label; this.size(100, 20); this.label = new Label(); this.label.fontSize = 12; this.label.color = "#FFFFFF"; this.addChild(this.label); } setLabel(value) { this.l...
来源: Laya2.0_示例 发布时间: 20251130
...部代码如下所示: ```typescript export default class ImageRunTime extends Laya.Image{ constructor(){ super(); this.scaleTime = 100; //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮。 this.on(Laya.Event.MOUSE_DOWN,this,this...
来源: Laya2.0_文档 发布时间: 20210715
...1. 可绑定内容的骨骼动画 export default class BindSkeleton extends Laya.Skeleton { private __bindList:BindSource[]; constructor(){ super(); this.__bindList=[]; } /** * 绑定 * @param source */ bind(source:BindSource):void{ let index:number=this.__bindList.indexOf(source); if(...
来源: Laya_社区 发布时间: 20190805
...回复 tea 赞同来自: 不清楚为啥 export default class gameMain extends ui.test.gameMain 这样也不行 2018-11-15 0 0 分享 微博 QZONE 微信 lsx968542 赞同来自: 是不是没有导入文件 import { ui } from "./ui/layaMaxUI"; 2018-11-16 0 1 分享 微博 QZONE 微信 为什么被...
来源: Laya_社区 发布时间: 20181115
...mport { FairyUtils } from './../utils/FairyUtils'; export class BaseSprite extends fairygui.GComponent TypeError: Object prototype may only be an Object or null: undefined preload.js:55 at setPrototypeOf (<anonymous>) 2019-02-27 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找...
来源: Laya_社区 发布时间: 20190227