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

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

11. UI-List [ 82%]

...+ index); } } import Box = Laya.Box; import Image = Laya.Image; class Item extends Box { public static WID: number = 373; public static HEI: number = 85; private img: Image; constructor(){ super(); this.size(Item.WID, Item.HEI); this.img = new Image(); this.addChild(this.img); } public setImg(src: s...

来源: Laya_示例 发布时间: 20251130

12. 使用js压缩工具报错 [ 82%]

...me]=ins[name] || {self:name}; if(_super) { var supers=_super.split(','); a.extend=[]; for(var i=0;i<supers.length;i++){ var nm=supers[i]; ins[nm]=ins[nm] || {self:nm}; a.extend.push(ins[nm]); } } var o=window,words=name.split('.'); for(var i=0;i<words.length-1;i++) o=o[words[i]]; o[words[words...

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

13. 性能测试-卡通人物2 [ 82%]

... % 60 === 0) { this.text.text = Stat.FPS.toString(); } } } class Character extends Sprite { public static WIDTH: number = 110; public static HEIGHT: number = 110; private speed: number = 5; private bloodBar: Sprite; private animation: Animation; private nameLabel: Text; constructor(images: Array) { ...

来源: Laya_示例 发布时间: 20251130

14. 字体切片组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property( { type : Laya.FontClip } ) public fontclp: Laya.FontClip; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwak...

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

15. 列表组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 81%]

...。 const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { @property({ type: Laya.List }) list: Laya.List constructor() { super(); } // 组件被启用后执行,例如节点被添加到舞台后 onEnable(): void { // 给List对象赋值 var data: Array<any&gt...

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

16. 绘制图形的BUG [ 81%]

... { import laya.display.Sprite; import laya.utils.Tween; public class MyBox extends Sprite { private var _shape:Sprite; public function MyBox() { super(); graphics.drawRect(0,0,200,200,"#00ff00"); _shape=new Sprite(); _shape.graphics.drawCircle(0,0,20,"#ff0000"); addChild(_shape); //加上这句正...

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

17. 2.3.0beta 各种bug [ 80%]

...禁用的,需要重新开启 修改 laya.d3.js   class PhysicsCollider extends PhysicsTriggerComponent {      constructor(collisionGroup = Physics3DUtils.COLLISIONFILTERGROUP_DEFAULTFILTER, canCollideWith = Physics3DUtils.COLLISIONFILTERGROUP_ALLFILTER) {      super(collisionGroup, canCol...

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

18. CameraMoveScript.as在哪儿下载群里的有错 [ 80%]

...ents.KeyBoardManager; /** * ... * @author */ public class CameraMoveScript extends Script { protected var lastMouseX:Number; protected var lastMouseY:Number; protected var yawPitchRoll:Vector3 = new Vector3(); protected var resultRotation:Quaternion = new Quaternion(); protected var tempRotationZ:Qu...

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

19. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 80%]

...错,这个时候借用下any吧,如: classA implements IA{ } classB extends classA{ } var items:IA = ; function(item:classB):void {  //items.push(item);//报错,提示类型错误  //方案一  items.push(<any>item);  //方案二  var temp:IA = <IA>item;  items.push(temp); ...

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

20. 3D变换 · LayaAir3.3 · 引擎文档 · LAYABOX [ 80%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Sprite3D }) public cube: Laya.Sprite3D; // 平移距离 private translate: Laya.Vector3 = new Laya.Vector3(1, 1, 1); constructor() { super(); } /** * 组件被激活后执行,此...

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