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

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

161. 获取位置信息 · LayaAir3.0文档 · LAYABOX [ 62%]

... 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_文档 发布时间: 20230725

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

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

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

163. typeScript Java互调问题 [ 62%]

...———————————————— public class MainActivity extends Activity{          private IPlugin mPlugin = null;     private IPluginRuntimeProxy mProxy = null;     boolean isLoad=false;     boolean isExit=false;     private WebView webView = null;     private Acti...

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

164. ComboBox显示问题 [ 62%]

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

165. layaMaxUI.ts的自动生成代码bug [ 62%]

...on = Laya.ClassUtils.regClass; export module ui { export class MainSceneUI extends Laya.SceneBase { constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("MainScene"); } } REG("ui.MainSceneUI",MainSceneUI); } 期待生成SceneBase, 结果仍然生成Laya.SceneBase  ...

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

166. 动画节点 · LayaAir3.0文档 · LAYABOX [ 62%]

... const { regClass, property } = Laya; @regClass() export class Animation extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Animation }) //在IDE面板中显示属性 ani: Laya.Animation; constructor() { super(); } //组件被激活后执行,此时所有节点和组件...

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

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

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

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

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

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

169. 为什么hitTestPoint始终是false? [ 62%]

为什么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

170. 输入文本组件 · LayaAir3.0文档 · LAYABOX [ 62%]

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

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