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

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

61. UI-List [ 76%]

...+ 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_示例 发布时间: 20240930

62. LayaFlash如何使用chrome调试问题? [ 76%]

... import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSiz...

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

63. 这样的panel请问如何实现比较好? [ 76%]

...义一个Item,界面分两层(可用两个Sprite进行划分) class Item extends ui.itemUI { private state = 0; constructor() { super(); //点击最先出来的按钮,会显示下一层界面,同时隐藏自己 this.btnFirst.on(Laya.Event.CLICK, this, this.change, [0]); //点击上面一层的...

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

64. 场景管理 · LayaAir3.0文档 · LAYABOX [ 76%]

...oyedScenes属性查看还未被销毁的场景列表 */ export class Scene extends Sprite { /**创建后,还未被销毁的场景列表,方便查看还未被销毁的场景列表,方便内存管理,本属性只读,请不要直接修改*/ static readonly unDestroyedScenes: Set<Scene> ...

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

65. 鼠标穿透问题 [ 76%]

...ort laya.utils.Handler; import laya.webgl.WebGL; public class Bootstrapper extends Sprite { protected var _list:List; protected var _items:Array; protected var _loadingBg:Sprite; public function Bootstrapper() { Laya.init(696, 1118, WebGL); Laya.stage.bgColor = "#232628"; Laya.stage.scaleMode = Stag...

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

66. 图像组件 · LayaAir3.0文档 · LAYABOX [ 75%]

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

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

67. 关于要自定shader的同学 [ 75%]

...的参照shader原文档 2.要修改shader里面的值 class ShaderValue extends Laya.Value2D {class ShaderValue extends Laya.Value2D { constructor () { super(0, 0) var _vlen = 8 * Laya.CONST3D2D.BYTES_PE this.position = [2, Laya.WebGLContext.FLOAT, false, _vlen, 0] this.texcoord = [2, Laya.WebGLCon...

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

68. ts继承后,代码压缩的问题 [ 74%]

...uglify-js对代码进行压缩有,会有很多重复的一下语句 var __extends = this && this.__extends || function() { var extendStatics = Object.setPrototypeOf || { __proto__: [] }instanceof Array && function(d, b) { d.__proto__ = b } || function(d, b) { for (var p in b) if (b.h...

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

69. 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'new' [ 74%]

...给一个3d物体挂在脚本的时候 比如有个脚本是: class Test extends Laya.Script3D{ }   如xxx是一个3D节点,代码里执行: let script:Test = xxx.addComponent(Test);   在web端没问题,在微信开发者工具里运行报错,已上传Demo项目 附件 : --> IdleDemo.zip 20...

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

70. 输入设备-贪吃蛇(重力感应) [ 74%]

...stage.width; food.y = Math.random() * Laya.stage.height; } } class Segment extends Laya.Sprite { constructor(width, height) { super(); this.size(width, height); this.init(); } init() { this.graphics.drawRect(-this.height / 2, -this.height / 2, this.width + this.height, this.height, "#FF7F50"); } // ...

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