• 首页
  • 动态
  • 案例
  • 引擎社区
  • API
  • 文档
  • 示例
  • 引擎下载

大约有 443 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0040 秒)

71. 这样的panel请问如何实现比较好? [ 69%]

...义一个Item,界面分两层(可用两个Sprite进行划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的...

来源: Laya_社区 发布时间: 20180810

72. 2.0 Beta3版本中,runtime脚本的的问题 [ 69%]

....Dialog; import Scene=Laya.Scene; export module ui { export class BGPageUI extends View { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("BGPage"); } } export class MonkeyPageUI extends View { constructor(){ super()} createChildren():void { super.createChildre...

来源: Laya_社区 发布时间: 20181014

73. 组件属性的代码使用 · LayaAir3.0文档 · LAYABOX [ 69%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type : Laya.Sprite}) public spr: Laya.Sprite; onAwake(): void { this.spr.size(512, 313); //设置Sprite大小 this.spr.loadImage("atlas/comp/image.png"); //添加纹理 } } 效果如图1-2所...

来源: Laya3.0_文档 发布时间: 20240809

74. 2.0下资源加载和销毁内存问题 [ 69%]

...片大小为640*1038,900K    先创建一个img实例 class bitmapimg extends Laya.Image //2.0版本 这里区别为export default class bitmap extends Laya.Image { private szurl:string="" constructor(url:string){ super() this.onUrlChangeHandler(url); } protected onUrlChangeHandler(url:string):v...

来源: Laya_社区 发布时间: 20181201

75. 报错:找不到基类,按照laya社区的解答做了,但是导致了另外一个类和接口出现一样的错 [ 68%]

...     * @author xiaozhibin      */      public class HelloLayaBox extends Sprite     {         public function HelloLayaBox()         {             Laya.init(600, 300);             var txt:Text = new Text();             txt.text = "HelloLayaBox";  ...

来源: Laya_社区 发布时间: 20171025

76. 多行输入文本组件 · LayaAir3.0文档 · LAYABOX [ 68%]

...st { regClass, property } = Laya; @regClass() export class TextAreaControl extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type : Laya.TextArea } ) public txtarea: Laya.TextArea; constructor() { super(); } /** * 组件被激活后执行,此时所有节点和组件均已创建...

来源: Laya3.0_文档 发布时间: 20230629

77. 面板容器组件 · LayaAir3.0文档 · LAYABOX [ 68%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Panel }) public panel: Laya.Panel; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.panel.pos(100, 100); t...

来源: Laya3.0_文档 发布时间: 20230923

78. UI-List [ 67%]

...+ index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: s...

来源: Laya_示例 发布时间: 20241001

79. 单选框组件 · LayaAir3.0文档 · LAYABOX [ 67%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Radio }) public radio: Laya.Radio; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radio.skin = "atlas/co...

来源: Laya3.0_文档 发布时间: 20231010

80. 垂直滑动条组件 · LayaAir3.0文档 · LAYABOX [ 66%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({type:Laya.VSlider}) public vslider: Laya.VSlider; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.vslider.pos(300,300...

来源: Laya3.0_文档 发布时间: 20230919