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

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

151. layaair 2.0 在构造函数中获取基类的组件,报错说未定义。 [ 60%]

...基类的组件,报错说未定义。 export default class GameLoading extends ui.gamoloadingUI{ constructor(){ super(); this.PB.changeHandler = new Laya.Handler(this,this.onChange); } } 基类中明确有PB变量,是进度条。此处构造函数中设置事件报错,说PB未定义,但是...

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

152. 获取位置信息 · LayaAir3.3 · 引擎文档 · LAYABOX [ 60%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { constructor() { super(); } onMouseClick(evt: Laya.Event): void { // 尝试获取当前位置 Laya.Geolocation.getCurrentPosition( Laya.Handler.create(this, this.onSuccess), Laya.Handler.create(this, this.o...

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

153. ComboBox显示问题 [ 60%]

...nHead { import laya.ui.*; import laya.display.*;  public class MainHeadUI extends View { public var image1:Image; public var input:TextInput; public var combox:ComboBox; public var radio:RadioGroup; public var checkBox:CheckBox; public var gongji:Button; public var btn1HasLabel:Button; public stati...

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

154. vmLaya: MVVM for LayaAir [ 60%]

... = $.timer(0, 500); } //一个 View @createView(TEST_PAGE) class HelloView extends VmViewBase<HelloViewModel> { //绑定 viewModel 的 hello$ 的值到 lbHello.text @vmBindLabel('hello$') lbHello: Laya.Label; }现实中的应用:绑定 List 和 Tab 现实中的应用:登录页面   附件...

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

155. must set Document Class 是怎么回事? [ 60%]

...nd class laya.ani.bone.Skeleton Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught TypeError: Class constructor Component cannot be invoked without 'new' 做微信开放域遇到Uncaught Can not find class laya.ui.WXOpenDataViewer 做微信开放域遇到Uncaught Can...

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

156. TS版分包报错 [ 60%]

...类似如下代码: module ui.coreUI {         export class TestUI extends View{         // do something...         } }       我在其它包的类中通过 import TestUI = ui.coreUI.TestUI ;  方式引入类 定义时报错:  "Uncaught ReferenceError: ui is not defined"    ...

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

157. 编辑模式下的赋值不保留? [ 60%]

... • 2018-10-25 14:56 写一个ts文件,写上 export default class Move extends Laya.Script{ /** @prop {name:target,tips:"目标容器",type:Prefab}*/ targetPrefab:Laya.Prefab; } 将文件在编辑模式下赋给点添加组件=》code=》move 然后创建一个box拖为预制体 放在...

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

158. 鼠标脚本(TypeScript-3D基础(TS)-LayaAir3D之鼠标交互) [ 59%]

...本。 > **脚本类**: ```typescript export default class MouseScript extends Laya.Script3D{ private meshsp:Laya.MeshSprite3D; constructor(){super();} /** * 覆写3D对象组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 */ onAwake(){ this.meshsp ...

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

159. 为什么hitTestPoint始终是false? [ 59%]

为什么hitTestPoint始终是false? class TestUI extends Laya.Sprite { private s:Laya.Sprite = new Laya.Sprite(); constructor() { super(); var img:Laya.Image = new Laya.Image("comp/bg.png"); this.s.addChild(img); this.addChild(this.s); Laya.stage.on(Laya.Event.CLICK, this, this.hitPoint); } priv...

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

160. runTime使用(ActionScript-IDE篇(AS3)-组件化开发相关) [ 59%]

...** *ImageRunTime逻辑类 * @author mengjia * */ public class ImageRunTime extends Image { //缩放时间100毫秒 public var scaleTime:int = 100; public function ImageRunTime() { //设置组件的中心点 this.anchorX = this.anchorY = 0.5; //添加鼠标按下事件侦听。按时时缩小按钮...

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