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

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

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

...转了添加了这个脚本的物体) > ```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. [ts] 找不到名称“Laya” [ 65%]

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

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

123. 水平滚动条组件 · LayaAir3.0文档 · 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_文档 发布时间: 20230911

124. 垂直滚动条组件 · LayaAir3.0文档 · LAYABOX [ 65%]

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

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

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

126. 怎样复制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

127. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 65%]

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

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

128. 输入设备-贪吃蛇(重力感应) [ 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_示例 发布时间: 20240930

129. 动态添加addComponent(Laya.RigidBody)的问题 [ 65%]

...lf()后会抛错 : laya.core.js:13190 Uncaught 无法实例class RigidBody extends Laya.Component {... 2.但如果将Laya.RigidBody组件直接挂在预制体上,用this.owner.getComponent(Laya.RigidBody)设置后,在调用  this.owner.removeSelf()则不会抛错。   附件 : --> 2020-01-19 ...

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

130. 显示文本组件 · LayaAir3.0文档 · LAYABOX [ 65%]

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

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