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

大约有 1,237 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0059 秒)

581. 性能测试-骨骼 [ 69%]

... { mActionIndex = 0; } for (var i = 0, n = mAnimationArray.length; i = []; private mFactory: Templet; constructor() { this.mSpacingX = Browser.width / this.colCount; this.mSpacingY = Browser.height / this.rowCount; Laya.init(Browser.width, Browser.height, WebGL); Stat.show(); this.mTexturePath = ".....

来源: Laya_示例 发布时间: 20260303

582. 特效LOADED监听不到 [ 69%]

...rt laya.utils.Handler; import laya.webgl.WebGL; public class LayaAirDemo { private const AniConfPath:String = "fighter/fighter.json"; public function LayaAirDemo() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN...

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

583. 自定义shader-简单shader [ 69%]

...dd(customShader, vs, ps, attributeMap, uniformMap); }class Shader_Simple { private rotation: Laya.Vector3; constructor() { Laya3D.init(0, 0, true); Laya.stage.scaleMode = Laya.Stage.SCALE_FULL; Laya.stage.screenMode = Laya.Stage.SCREEN_NONE; Laya.Stat.show(); this.initShader(); var scene: Laya.Scene...

来源: Laya_示例 发布时间: 20260303

584. 图集打包后使用Texture不显示,项目整个已经传上来了 [ 69%]

...dler; class GameMain{ constructor() { Laya.init(600,400); this.hahaha(); } private hahaha(): void { var assets: Array<any> = []; assets.push({ url: "res/start.json", type: Loader.ATLAS}); Laya.loader.load(assets, Handler.create(this, this.onComplete)); } private onComplete(): void { var textur...

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

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

...试着用代码实现物理效果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:laya.physics.BoxCollide...

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

586. 关于Timer延迟调用有一些不解 [ 69%]

关于Timer延迟调用有一些不解 private function skill():void {    Laya.timer.once(1500,this,finish);     //Laya.timer.once(3000,this,finish);  } private function skill():void {    this.visible=false; } 假定这是一个简陋的人物隐身技能,蓄力1.5s后人物消失。   ...

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

587. 我用的HBox做的进度条为啥总是一闪一闪的。 [ 69%]

...ont(100); //test用 // if(num==100){ // G.I.loginManager.preload(); // } } private hbox:Laya.HBox; private updateFont(value:number){ if(!this.hbox){ this.hbox = new Laya.HBox(); this.addChild(this.hbox); }else{ this.hbox.removeChildren(); } var cout:string = value.toString(); for(var i=0;i<cout.l...

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

588. 绘制图形的BUG [ 69%]

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

589. 屏幕适配-自动横屏 [ 69%]

...tage.SCREEN_HORIZONTAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Landscape"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.heig...

来源: Laya_示例 发布时间: 20260303

590. 屏幕适配-自动竖屏 [ 69%]

... Stage.SCREEN_VERTICAL; Laya.stage.bgColor = "#232628"; this.showText(); } private showText(): void { var text: Text = new Text(); text.text = "Orientation-Portrait"; text.color = "gray"; text.font = "Impact"; text.fontSize = 50; text.x = Laya.stage.width - text.width >> 1; text.y = Laya.stage.heigh...

来源: Laya_示例 发布时间: 20260303