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

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

1541. 关于图集打包问题及其解决方法 [ 70%]

...为playerAtlas.atlas.   附上加载图集资源代码:  var playerAnim= new Laya.Animation(); playerAnim.loadAtlas("/desktop/atlasSource/playerAtlas",Laya.Handle.create(this,this.onAtlasLoad),"playerAnim"); function onAtlasLoad(){     console.log("图集加载完毕");     Laya.stage.addChild...

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

1542. 加载资源时同时加载两遍 [ 70%]

...就好了 if(hero == null) { this.tiledmap.name = "xx00"; var viewRect = new Rectangle(0,0,1080,1100); this.tiledmap.createMap("../laya/assets/map/beitianting.json",viewRect,Handler.create(this,onMapCreated)); }   仙魔世界测试.rar 2017-11-20 0 0 分享 微博 QZONE 微信 layaxiaohu 赞同来...

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

1543. 扇形遮罩问题。 [ 70%]

...罩问题。 为一个矩形设置扇形遮罩 代码: 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); //画扇形 当这个扇形画的角度是 0-360度...

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

1544. 针对3d对象添加碰撞.boundingBox为空是什么原因? 跟资源有关系么? [ 70%]

...要回复问题请先登录 发起人 czronaldo11 相关问题 两个对象new了一个相同的对象,调用第一个的一个方法,走进了第二方法里 sprite旋转以后,但是原来碰撞检测rect没有旋转 微信关系链:LayaAir引擎针对微信小游戏好友关系链实现...

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

1545. 关于3d项目中component的问题 [ 70%]

...是我的代码,请大家指正!(function () { var convertTranslate = new Laya.Vector3(0, 0, 0); function CmpScript() { CmpScript.super(this); this.x = 0; } Laya.class(CmpScript, "CmpScript", Laya.Script) CmpScript.prototype._initialize = function (owner) { var _this = this; CmpScript.__super.pr...

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

1546. 设置pivot后,精灵位置显示位置不正确 [ 70%]

...0, 1500); //设置舞台背景色 Laya.stage.bgColor = "#ffffff" this.sp = new Laya.Sprite(); let width = 660 let height = 420 this.sp.size(width, height) this.sp.pivot(Math.round(width / 2), Math.round(height / 2)) this.sp.graphics.drawCircle(0, 0, 5, "#000000") this.sp.graphics.drawRect(-this.sp.p...

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

1547. laya中js 如何实现Sprite类继承 [ 70%]

...文件:a.js    组件文件:Role.js a.js文件代码: this.Role = new Role(); this.RoleMap = new Laya.Sprite(); this.RoleMap.size(Laya.stage.width, Laya.stage.height/2); Laya.stage.addChild(this.RoleMap); this.RoleMap.addChild(this.Role); this.Role.pivot(16,24);// 图片32x48 this.Role.pos(1...

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

1548. 我创建了 一个 dialogUI,怎么在页面中打开? [ 70%]

我创建了 一个 dialogUI,怎么在页面中打开? this.wrong=new ui.wrongUI; this.wrong.width=300; this.wrong.height=200; this.wrong.x=50; this.wrong.y=100; this.doworkui.addChild(this.wrong); doworkui是我的一个UI,我要在这个面中打开一个对话框. wrongUI是我创建的 对话...

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

1549. VScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 70%]

...e function createVScroller():void { //实例化水平滚动条 vScrollBar= new VScrollBar(); //加载皮肤资源(其他资源根据规范命名后,会自动加载) vScrollBar.skin = "../../../../res/ui/vscroll.png"; //设置高度 vScrollBar.height = 200; //设置位置 vScrollBar.pos(400, 20...

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

1550. HScrollBar属性详解(ActionScript-IDE篇(AS3)-IDE组件属性详解) [ 70%]

...e function createHScroller():void { //实例化垂直滚动条 hScrollBar= new HScrollBar(); //加载皮肤资源(其他资源根据规范命名后,会自动加载) hScrollBar.skin = "../../../../res/ui/hscroll.png"; //设置宽度 hScrollBar.width = 400; //设置位置 hScrollBar.pos(150, 170...

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