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

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

81. Image加载完成后的图片大小重设问题 [ 69%]

...示都是原来设定的大小。示例代码如下:   class PlayGame extends ui.PlayGameUI {     constructor() {         super();        init();     }     public init ():void     {         this.bg_img.loadImage("ui/bg.jpg",0,0,Laya.stage.width,Laya.stage.height,Laya.Handler.c...

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

82. 按钮组件 · LayaAir3.0文档 · LAYABOX [ 68%]

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

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

83. 缓动-缓动函数演示 [ 68%]

...3); input.inputElementYAdjuster = 1; return input } } class ListItemRender extends Laya.Box { constructor() { super(); const Label = Laya.Label; this.size(100, 20); this.label = new Label(); this.label.fontSize = 12; this.label.color = "#FFFFFF"; this.addChild(this.label); } setLabel(value) { this.l...

来源: Laya2.0_示例 发布时间: 20241001

84. 单选框组组件 · LayaAir3.0文档 · LAYABOX [ 68%]

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

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

85. must set Document Class 是怎么回事? [ 68%]

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

86. 取色器组件 · LayaAir3.0文档 · LAYABOX [ 68%]

...nst { regClass, property } = Laya; @regClass() export class UI_ColorPicker extends Laya.Script { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { La...

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

87. 为啥静态变量name不能定义 [ 68%]

...tor function 'GFHomePageView'. 代码如下: export class GFHomePageView extends ui.GFGameHomeUI { static name = "homepageview"; static moreBgNodeName = "morebgnode"; static diamondList: any; static clickedWeixinClose:boolean = false; 2017-09-08 添加评论 免费帖 --> 分享 微博 QZONE 微...

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

88. 3D场景跳转到2D场景问题 [ 68%]

...UI' import GameScene from './GameScene'; export default class VictoryScene extends VictorySceneUI {  constructor() { super();   } onAwake(){ let btnOnce=this.getChildByName("btnOnce"); btnOnce.on(Laya.Event.CLICK,this,this.onClick); } onClick(e){ this.removeSelf(); let gameScene=new GameScene(); L...

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

89. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 68%]

...laya/ui/List"; import { Laya } from "laya"; export default class test_move extends Image{ // /** @prop {name:move_img, tips:"用来移动的箭头", type:Image} */ // public _move_img: Image; // public _list: List; //创建一个 List 类的实例对象 list 。 private n:number = 0; private x0:numb...

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

90. popup设置了关闭效果后,窗口关闭但遮罩层没有关掉,请问如何处理 [ 68%]

... }   import { ui } from "./ui/layaMaxUI"; export default class ShopDialog extends ui.ShopDialogUI { constructor() { super(); this.popupEffect = Laya.Handler.create(this, this.showEffect); this.closeEffect = Laya.Handler.create(this, this.hideEffect); this.btnClose.on(Laya.Event.CLICK, this, this.cl...

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