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

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

41. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 92%]

... ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var _path2:Sprite = new Sprite(); private var arr:Array = ; private var arr2:Array = ; private var pop:TestDialogUI; public ...

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

42. 性能测试-卡通人物2 [ 92%]

...项目开发更高效。let amount = 500, character1 = [ "res/cartoon2/yd-6_01.png", "res/cartoon2/yd-6_02.png", "res/cartoon2/yd-6_03.png", "res/cartoon2/yd-6_04.png", "res/cartoon2/yd-6_05.png", "res/cartoon2/yd-6_06.png", "res/cartoon2/yd-6_07.png", "res/cartoon2/yd-6_08.png", ], character2 = [ "...

来源: Laya2.0_示例 发布时间: 20240930

43. 在安卓手机上drawToTexture不能正确返回纹理对象,是HTMLCanvas [ 92%]

...出包。手机上调用此方法返回的对象类型不对    private _agentTexture: any; private _agent:Laya.Sprite;    public startDrag(dragCom: Laya.Sprite, touchID: number, sourceData?: any): void {let bounds = dragCom.getSelfBounds(); this._agentTexture = Laya.Sprite.drawToTexture(dragCom...

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

44. 【简单跑酷--JS版】---Lv.6 终篇 [ 92%]

... //背景 this.bg = null; //进度条 this.bar = null; //最小值 this.MIN_VALUE = 0; //最大值 this.MAX_VALUE = 100; //值 this.value = 100; Hp.__super.call(this); this.init(type); } //能量类型 Hp.HP_TYPE_ENERGY = "hp_type_energy"; //速度类型 Hp.HP_TYPE_SPEED = "hp_type_speed"; //Hp Laya...

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

45. Text的中划线(删除线) [ 91%]

...aya.core.js this.underline && this.drawUnderline(textAlgin,x,y,i); __proto.drawUnderline=function(align,x,y,lineIndex){             var lineWidth=this._lineWidths[lineIndex];             switch (align){                 case 'center':          ...

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

46. Slider控件的标签不居中 [ 91%]

...ar label:Label = Slider.label; addChild(label); label.textField.changeText(_value + ""); if (isVertical) { label.x = _bar._x + 20; label.y = (_bar.height - label.height) * 0.5 + _bar._y; } else { label.y = _bar._y - 20; label.x = (_bar.width - label.width) * 0.5 + _bar._x; } } }在Slider类里面显...

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

47. 关于LAYA TS重写X和Y坐标的问题 [ 91%]

... 在LAYA TS里 是不能直接重写X和Y的 因为重写必须直接操作_x_y 这样程序就不能通知到Native 导致打包后坐标始终是00 而在LAYA AS3环境里却是可以重写的 因为AS3可以super.x super.y 打个比方 假设在LAYA TS 里这么写 class XXX extends Sprite { p...

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

48. laya.physics.RigidBody [ 91%]

...的方式使其运动 RigidBodyProtected Properties PropertyDefined By  _allowRotation : Boolean = true是否允许旋转,如果不希望刚体旋转,这设置为falseRigidBody  _allowSleep : Boolean = true是否允许休眠,允许休眠能提高性能RigidBody  _angularDamping : Number...

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

49. ts加密md5码封装 [ 91%]

...dule": "commonjs", "target": "es6", "sourceMap": true }, "exclude": [ "node_modules" ] } test: let str = Md5.Instance.get_md5("123456"); console.log(str) //len:32 //e10adc3949ba59abbe56e057f20f883emd5.ts class Md5 { private static _inst:Md5; public static get Instance():Md5 { return this._inst ||(th...

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

50. TimeLine调用destroy报错&执行完成后回到起点 [ 91%]

...2479 Uncaught TypeError: Cannot read property 'length' of null at TimeLine.__proto._update (HMain.max.js:12479) at TimerHandler.__proto.run (HMain.max.js:9196) at Timer.__proto._update (HMain.max.js:8951) at Stage.__proto.render (HMain.max.js:16932) at Stage.__proto._loop (HMain.max.js:16892) at loo...

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