大约有 3,979 项符合查询结果, 库内数据总量为 30,906 项。 (搜索耗时: 0.0071 秒)
Laya_社区(2827) Laya2.0_文档(369) Laya2.0_api(225) laya_api(169) Laya_示例(157) Laya2.0_示例(117) Laya3.0_api(62) Laya3.0_文档(53)
laya的rectangle.intersects和as3实现不一致? var r:Rectangle = new Rectangle(0,1,7,6 ); var r2:Rectangle = new Rectangle(7,2,7,6 ); trace( r.intersects( r2 ) ); 这段代码,as3返回false,laya返回true; 在做移植,发现该问题,请大神解答下; 2018-01-03 添加评论 ...
来源: Laya_社区 发布时间: 20180103
...e { public function LayaSample() { //初始化引擎 Laya.init(1136, 640); var txt:Text = new Text(); txt.text = "hello_world"; txt.color = "#ffffff"; Laya.stage.addChild(txt); } } } ``` 这个时候我们就可以看到txt已经添加到舞台上了,显示了txt中 白色的hello_world。 接着...
来源: Laya2.0_文档 发布时间: 20210714
3D动画无法播放 var shared:MeshSprite3D = scene.addChild(new MeshSprite3D(Mesh.load("http://192.168.1.41/mod/shared-Sphere001.lm"))) as MeshSprite3D; shared.transform.localScale = new Vector3(0.3, 0.3, 0.3); //获取角色动画组件 va...
来源: Laya_社区 发布时间: 20180118
...默认类型)ResourceVersionProperty Detailmanifestpropertypublic static var manifest:Object版本清单typeproperty public static var type:int = 1当前使用的版本管理类型Method DetailaddVersionPrefix()method public static function addVersionPrefix(originURL:String):String 为加载路...
来源: Laya2.0_api 发布时间: 20190513
扇形遮罩问题。 为一个矩形设置扇形遮罩 代码: var sp:Sprite = new Sprite(); Laya.stage.addChild(sp); sp.alpha = 0.8; sp.graphics.drawRect(50,50,50,50,"#ff0000"); var sp1:Sprite = new Sprite(); sp1.alpha = 0.5; //Laya.stage.addChild(sp1); //画扇形 当这个扇形画的角度...
来源: Laya_社区 发布时间: 20180111
...- 知识达人 赞同来自: lzt9977 将代码中的 // 计算碰撞区域 var hitRadius = role1.hitRadius = role2.hitRadius;改为var hitRadius = role1.hitRadius + role2.hitRadius;即可 2017-11-02 1 0 分享 微博 QZONE 微信 lzt9977 赞同来自: 已解决 谢谢 2017-11-02 0 0 分享 微博 QZ...
来源: Laya_社区 发布时间: 20171102
官方的示例贴上来,怎么没反映啊 var JiHuo = (function (_super) { function JiHuo() { JiHuo.super(this); var xhr = new Laya.HttpRequest(); xhr.http.timeout = 10000;//设置超时时间; xhr.once(Event.COMPLETE, this, completeHandler); xhr.once(Event.ERROR, this, errorHandler); xhr.on(...
来源: Laya_社区 发布时间: 20180419
...t(16,24);// 图片32x48 this.Role.pos(100, 200); Role.js基础代码: var Role = ( function ( _super ) { function Role () { Role._super.call(this); /***一些基础信息***/ } Laya.class( Role , "Role" , Sprite ); var _proto_ = Role.prototype; /******/ return Role; })(); 2018-10-12 添加评...
来源: Laya_社区 发布时间: 20181012
...isionActive', this.onCollision); private onCollision(event): void { for(var i = 0; i < event.pairs.length; i++) { var pair = event.pairs[i]; if(pair.bodyA.label === 'gun' && pair.bodyB.label == "gameover") { this.onGameOver(); } } } private onGameOver(): void { console.log("...
来源: Laya_社区 发布时间: 20180524
...gth 动画最后一帧的索引值, */ function aniUrls(aniName,length){ var urls = []; for(var i = 0;i<length;i++){ //动画资源路径要和动画图集打包前的资源命名对应起来 urls.push("role/"+aniName+i+".png"); } return urls; } ``` 代码运行效果如动图9所示,只播放...
来源: Laya2.0_文档 发布时间: 20210715