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

大约有 458 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0056 秒)

121. Sprite3D添加组件或脚本(TypeScript-3D基础(TS)-LayaAir3D之精灵) [ 66%]

...转了添加了这个脚本的物体) > ```typescript class MonkeyScript extends Laya.Script3D { private rotation:Laya.Vector3 = new Laya.Vector3(0, 0.01, 0); constructor(){ super(); } onAwake() { console.log("onAwake"); } onStart() { console.log("onStart"); } onUpdate() { (this.owner as Laya.Sprite...

来源: Laya2.0_文档 发布时间: 20210715

122. 下拉选项框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 66%]

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

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

123. 复选框组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

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

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

124. 分包项目, 加载js时报错 [ 65%]

...关的链接 提交 2 个回复 sevennqi 赞同来自: 这个是我改成extends Box:  package {     import laya.ui.Box;     import laya.display.Text;     import laya.ui.View;     /*[COMPILER OPTIONS:ForcedCompile]*/     public class loading100 extends Box     {         publ...

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

125. [ts] 找不到名称“Laya” [ 65%]

...貌似是找不到laya的支持包。 export default class HomeViews extends L编辑器也不自动提示laya的包 附件 : --> 2020-09-08 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 layabox 赞同来自:...

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

126. UI怎么设置居中显示,显示到游戏窗口中 [ 65%]

... Event = Laya.Event; import Browser = Laya.Browser; export class ViewLogin extends ui.loginViewUI { constructor() { super(); this.smo this.visible = false; 我的问题是UI界面如何对齐,不是舞台。。 2018-02-06 0 0 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 要...

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

127. 输入设备-贪吃蛇(重力感应) [ 65%]

...stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Sprite { constructor(width:number, height:number) { super(); this.size(width, height); this.init(); } private init():void { this.graphics.drawRect(-this.height / 2, -this.height / 2, this.width + this.height, this.hei...

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

128. 怎样复制bmf字体 [ 65%]

...bel使用的并不是 ide中自己做的bmf字体。    class cloneLabel extends Laya.Label { constructor(_label) { super(); this.align = _label.align; this.x = _label.x; this.y = _label.y; this.width = _label.width; this.height = _label.height; this.fontSize = _label.fontSize; this.color = _label...

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

129. 位图切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

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

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

130. 水平滚动条组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 65%]

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

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