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

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

581. 特效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

582. 自定义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_示例 发布时间: 20251209

583. 图集打包后使用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

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

585. 关于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

586. 我用的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

587. 绘制图形的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

588. 屏幕适配-自动横屏 [ 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_示例 发布时间: 20251209

589. 屏幕适配-自动竖屏 [ 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_示例 发布时间: 20251209

590. 【分享】圆形进度条上图片跟随进度并旋转角度 [ 69%]

...l, false));      /** * 加载资源进度 * @param percent 百分比 */ private onLoading(percent: number): void { this.view.box_mark.graphics.drawPie(216, 216, 216, -90, (-90 + Math.floor(percent * 360)), "#ff0000"); //画进度 let point: { x: number, y: number, hudu: number } = this.cal(216, 2...

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