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

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

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

...蒙版也没有关闭其他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. view和panel关于mouseThrough的区别 [ 75%]

...么情况???都是有设置 mouseThrough=true的,就改动了继承 extends Laya.View可穿透 extends Laya.Panel不可穿透   附件 : --> 2018-04-26 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内容相关的链接 提交 1 个回复 w111436...

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

43. UI运行时 · LayaAir3.0文档 · LAYABOX [ 75%]

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

44. 2.0 beta UI Button无法获取 [ 75%]

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

45. 资源加载 · LayaAir3.0文档 · LAYABOX [ 75%]

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

46. 音频节点 · LayaAir3.0文档 · LAYABOX [ 75%]

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

47. 绘制图形的BUG [ 75%]

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

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

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

49. TiledMap,mapLayer追加精灵无法显示,已参考完已有问题解答,无法解决 [ 74%]

...owGridList不存在,需要在libs/LayaAir.d.ts里,找到class MapLayer extends Sprite这一行,在下面加上一行代码: class MapLayer extends Sprite { _mapData: Array<any>; /** * @private */ _gridSpriteArray: Array<any>; _showGridList: Array<any>; //这行是我新加...

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

50. 获取sprite对象的 width和height为0 [ 74%]

获取sprite对象的 width和height为0  /** * 船 */ class Boat extends Laya.Sprite { private bt:Laya.Sprite; constructor() { super() this.bt = new Laya.Sprite() this.bt.loadImage("res/boat.png") this.addChild(this.bt) } } /** * 游戏背景 */ class BackGround extends Laya.Sprite { //背景图 ...

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