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

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

201. 多重遮罩显示异常 [ 57%]

...一部分或者消失,测试代码如下 export default class ClipView extends Laya.Sprite { constructor() { super(); this.init(); } init() { let bg = new Laya.Sprite(); bg.graphics.drawRect(0, 0, 500, 500, '#aaa'); this.addChild(bg); this.panel = new Laya.Panel(); this.panel.width = 500; this.pan...

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

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

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

203. 内嵌模式创建scene,运行时报找不到json文件 [ 57%]

...ide自动生成的代码。     export module ui { export class HelloUI extends Scene { public static uiView:any ={"type":"Scene","props":{"width":640,"height":1136},"compId":2,"child":[{"type":"Label","props":{"y":64,"x":214.5,"width":211,"text":"label","styleSkin":"comp/label.png","height":67},"...

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

204. [LayaAir 2.0] 如何用代码为Spirte添加2d物理特性 [ 57%]

...性 官方的2d物理引擎文档都是IDE篇的。   class CollisionBoll extends Laya.Sprite { private _boll1:Laya.Sprite; constructor() { super(); //物理模块 this._boll1 = new Laya.Sprite(); this.addChild(this._boll1); this._boll1.x = 20; this._boll1.loadImage('comp/btn_close.png'); let box:l...

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

205. 2.0版本,Particle2D is not a constructor [ 57%]

2.0版本,Particle2D is not a constructor export default class RunMain extends Laya.Sprite{ constructor(){ super(); Laya.loader.load([{url:"res/213.part",type:Laya.Loader.JSON}],Laya.Handler.create(this,this.onAssetsLoaded)); } onAssetsLoaded(){ let pg = Laya.loader.getRes("res/213.part"); let pd...

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

206. 升级到1.78beta版后,包编译错误 [ 57%]

...0,11): error TS2417: Class static side 'typeof RenderTarget2D' incorrectly extends base class static side 'typeof Texture'.   Types of property 'create' are incompatible.     Type '(w: number, h: number, surfaceFormat?: number, surfaceType?: number, depthStencilFormat?: number,...' is not assigna...

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

207. Laya2.0正式版2D官方demo测试有问题 [ 57%]

...date()去调用的。 在编辑的时候两种onUpdate也是有差异的,extends Laya.Script的脚本中的onUpdate,鼠标移上去是有功能说明的:每帧更新时执行,尽量不要在这里写大循环逻辑或者使用getComponent方法 此方法为虚方法,使用时重写覆盖...

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

208. 按钮组件 · LayaAir3.0文档 · LAYABOX [ 57%]

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

209. 为什么这个ui中给这个TextInput组件runtime属性绑定了一个类 [ 57%]

...runtime属性绑定了一个类 绑定了这个类后, class TextInputEx extends Laya.TextInput constructor() { console.log("执行了"); super() ; } // 获取焦点 onFocus() : void { console.log("焦点进入"); // 是否缓存初始的文本提示字符串和文本颜色. if (!this.initText) { ...

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

210. Sprite设置mask属性为什么显示是透明的?怎样才能显示正常? [ 57%]

...明  var gameContainer = new Sprite(); gameContainer.loadImage("gameres/extend/micro/bg.png");  var mask = new Sprite(); mask.alpha = 0.3; mask.graphics.drawRect(0, 0, Laya.stage.width, Laya.stage.height, "#000000"); mask.on(Laya.Event.CLICK,this,chick);   function chick(){ mask.destroy(); gameCo...

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