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

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

71. 进度条组件 · LayaAir3.0文档 · LAYABOX [ 73%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.ProgressBar }) public progressBar: Laya.ProgressBar; @property({ type: Laya.Text }) public loadText: Laya.Text; //组件被激活后执行,此时所有节点和组件均已创建...

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

72. MovieClip is not a constructor [ 73%]

...Laya.Sprite; import MovieClip=Laya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被...

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

73. 垂直布局容器组件 · LayaAir3.0文档 · LAYABOX [ 73%]

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

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

74. 水平布局容器组件 · LayaAir3.0文档 · LAYABOX [ 73%]

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

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

75. 缓动-缓动函数演示 [ 73%]

...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_示例 发布时间: 20240930

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

... 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

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

...片大小为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

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

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

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

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

...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

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

... 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