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

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

41. dialog的popup方法不会关闭其他弹窗 [ 79%]

...蒙版也没有关闭其他dialog 登录界面的代码: class LoginView extends ui.loginUI { normalDialog: NormalDialog; constructor() { super();  this.btn_signin.on(Laya.Event.CLICK, null, () => { this.showDialog("登录成功") }); this.btn_register.on(Laya.Event.CLICK, null, () => { thi...

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

42. 组件装饰器说明 · LayaAir3.0文档 · LAYABOX [ 78%]

...如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 如动图1-1所示,只有使用了上述的这个装饰器标识,开发者自定义的组件脚本才会被IDE识别为组件,可以被节点(实体)的属性设置面板 -> 增加组件 -...

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

43. class导出问题 [ 78%]

...器超过一页后必出问题 Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught Can not find class laya.ani.bone.Skeleton 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'new' Uncaught Can not find class laya.html.dom.HTMLDivEleme...

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

44. UI运行时 · LayaAir3.0文档 · LAYABOX [ 78%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...

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

45. 2.0 beta UI Button无法获取 [ 78%]

....Dialog; import Scene=Laya.Scene; export module ui { export class AttackUI extends View { public btn_attack:Laya.Button; constructor(){ super()} createChildren():void { super.createChildren(); this.loadScene("Attack"); } } } 扩展UI代码:   import { ui } from "../ui/layaMaxUI"; export default c...

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

46. 资源加载 · LayaAir3.0文档 · LAYABOX [ 78%]

... const { regClass, property } = Laya; @regClass() export class LoaderDemo extends Laya.Script { onAwake(): void { this.loadTexture("resources/image/monkey2.png", 500);//需要在resources/image放入相应的资源 this.loadTexture("https://layaair.com/3.x/demo/resources/res/apes/monkey2.png"); } /*...

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

47. 针对2.0.0 beta5 setLoadingPage 做增强 [ 78%]

...age1Runtime.jsimport LoadPage from './loadPage' export default class page1 extends Laya.Scene { constructor() { super() } onEnable() { // 预加载loadPage let loadPage = new LoadPage() loadPage.preload() this.getChildByName('text').on(Laya.Event.CLICK, this, function () { // 切换打开场景方...

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

48. 音频节点 · LayaAir3.0文档 · LAYABOX [ 78%]

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

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

49. 绘制图形的BUG [ 78%]

... { import laya.display.Sprite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正...

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

50. List数据源的格式问题导致无法响应List的SelectHandler [ 78%]

...} list.array = temp;2、SkillInfoVO的相关代码public class SkillInfoVO extends Data { public var Lv:int; public var Name:String; public var Color:int; }3、Data的相关代码public class Data extends EventDispatcher { public function Data() { } protected function dataSourceChange(eventType:Stri...

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