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

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

51. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 52%]

...心点为显示对象的中心,显示位置在可拖拽区域之内 sp.pivot(sp.width/2,sp.height/2); sp.pos(250,450); Laya.stage.addChild(sp); //为需要滑动的对象添加down,down下开始move,up时移除move和up事件 sp.on(Event.MOUSE_DOWN,this,onDown); Laya.stage.on(Event.MOUSE_UP,th...

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

52. 物理Bodies绑定Laya.Sprite [ 52%]

...rite().loadImage("images/qiang_001.png"); gun_skin.scale(50, 50); gun_skin.pivot(gun_skin.width / 2, gun_skin.height / 2); gun = Bodies.rectangle(150, 150, 50, 50, { frictionAir: 0.5, //空气摩擦力 density: 0.68, // 密度 layaSprite: gun_skin, // 绑定一个laya的Sprite, 不能用render.sprit...

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

53. 请大家帮助优化一下这个抛物线的代码 [ 45%]

...s.body = new Laya.Sprite(); this.body.loadImage("war/ball.png"); this.body.pivot(12,12); } this.addChild(this.body); Laya.timer.frameLoop(1,this,this.animate); } private animate(e):void{ this.body.rotation += 10; } } class Main{ private ball:Ball; private targetX:number = 600; private targetY:numbe...

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

54. laya.display.Text [ 26%]

...以像素为单位)。 Text parent : Node[read-only] 父节点。Node pivotX : NumberX轴 轴心点的位置,单位为像素,默认为0。轴心点会影响对象位置,缩放中心,旋转中心。Sprite pivotY : NumberY轴 轴心点的位置,单位为像素,默认为0。轴心点...

来源: Laya2.0_api 发布时间: 20190513

55. laya.display.Input [ 26%]

...以像素为单位)。 Text parent : Node[read-only] 父节点。Node pivotX : NumberX轴 轴心点的位置,单位为像素,默认为0。轴心点会影响对象位置,缩放中心,旋转中心。Sprite pivotY : NumberY轴 轴心点的位置,单位为像素,默认为0。轴心点...

来源: Laya2.0_api 发布时间: 20190513