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

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

761. 3D寻路 · LayaAir3.0文档 · LAYABOX [ 62%]

...通过下面的代码,可以初始化A*的地图数据 //读取地形图 this.aStarMap = Loader.getTexture2D("res/threeDimen/scene/TerrainScene/Assets/AStarMap.png"); //获得地图数据 var aStarArr = this.createGridFromAStarMap(this.aStarMap); //使用astar初始化地图数据 this.graph = new...

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

762. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 62%]

...raphics.drawCircle(0,0,50,'#FF0000'); sp.mask=mask; Laya.timer.frameLoop(1,this,function():void { mask.x++; sp.repaint(); }); ``` ## 三、Sprite自身绘制的graphics矢量图形注册事件点击区域差异; ​ 在原生Flash AS3中,Sprite精灵创建完成后会自动计算宽高。但是在...

来源: Laya2.0_文档 发布时间: 20191206

763. LayaAir引擎AS3与Flash原生AS3的开发差异(ActionScript-简介篇(AS3)-LayaAir引擎简介) [ 62%]

...raphics.drawCircle(0,0,50,'#FF0000'); sp.mask=mask; Laya.timer.frameLoop(1,this,function():void { mask.x++; sp.repaint(); }); ``` ## 三、Sprite自身绘制的graphics矢量图形注册事件点击区域差异; ​ 在原生Flash AS3中,Sprite精灵创建完成后会自动计算宽高。但是在...

来源: Laya2.0_文档 发布时间: 20210714

764. 刚刚接触2天layaair,有几个问题请教。 [ 62%]

...续流程 Laya.ResourceVersion.enable("version.json", Laya.Handler.create(this, this.onVersionLoaded), Laya.ResourceVersion.FILENAME_VERSION); } onVersionLoaded() { //激活大小图映射,加载小图的时候,如果发现小图在大图合集里面,则优先加载大图合集,而不是小...

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

765. 请问有没有方法能够获取“鼠标是否处于按下状态”? [ 62%]

...听 move事件的话! onMouseDown  中 Laya.stage.on(Event.MOUSE_MOVE, this, onMouseMove); onMouseUp  中   Laya.stage.off(Event.MOUSE_MOVE, this, onMouseMove); 也可以写个变量  ,down的时候为true,否则为false  如"cuixueying"  回答的一样! 2017-04-21 3 0 分享 微博 ...

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

766. 为什么会出现报错 ani not found:ufo1_down [ 61%]

... var Game = (function(){ (function Game(){ // 子弹发射偏移位置表 this.bulletPos = [[0],[-15,15],[-30,0,30],[-45,-15,15,45]]; // 关卡等级 this.level = 0; // 升级等级所需要的成绩数量 this.levelUpScore = 0; // 积分成绩 this.score = 0; // 子弹级别 this.bulletLevel = 0; ...

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

767. sprite 设置为静态变量后,无法从舞台移除 [ 61%]

...mage("background.jpg"); Laya.stage.addChild(sp); Laya.stage.on(Event.CLICK,this,onClick); function onClick():void { // TODO Auto Generated method stub Laya.stage.off(Event.CLICK,this,onClick); Laya.stage.removeChild(sp); Loader.clearRes("background.jpg"); sp.destroy(); } } } } 2016-09-05 0 0 分享 ...

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

768. 背景音乐来回切换报错 [ 61%]

...null         Laya.loader.load("res/dreams.mp3",Laya.Handler.create(this,function(){             dreamsSound = Laya.SoundManager.playMusic("res/dreams.mp3")         }))          let mainSound:Laya.SoundChannel = null;         this.btn_sound.on(Laya.Event.C...

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

769. 2D性能优化 · LayaAir3.3 · 引擎文档 · LAYABOX [ 61%]

....Stat.show(); var textBox=new Laya.Sprite(); for(var i=0;i<10000;i++) { this.text=new Laya.Text(); this.text.text=(Math.random()*100).toFixed(0); this.text.color="#CCCCCC"; this.text.x=Math.random()*550; this.text.y=Math.random()*400; textBox.addChild(this.text); } Laya.stage.addChild(textBox); }...

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

770. 如何实现3d遮罩效果? [ 61%]

...a1.addComponent(CameraMoveScript); } private function loadUI():void { var _this:D3Base_TargetTexture = this; Laya.loader.load(["../../../../res/threeDimen/ui/button.png"], Handler.create(null, function():void { var btn:Button = new Button(); btn.skin = "../../../../res/threeDimen/ui/b...

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