大约有 1,253 项符合查询结果, 库内数据总量为 30,900 项。 (搜索耗时: 0.0050 秒)
...。示例代码如下: const { regClass, property } = Laya; @regClass() export class UI_ColorPicker extends Laya.Script { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行...
来源: Laya3.0_文档 发布时间: 20240910
...ist = Laya.List; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_List { constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(800, 600, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = Stage.ALIGN_CENTER; Laya.stage.scaleMode = Stage.SCALE_S...
来源: Laya2.0_文档 发布时间: 20210715
...aya.HttpRequest; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Network_GET { private hr: HttpRequest; private logger: Text; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_...
来源: Laya_示例 发布时间: 20250220
...,我们可以对每个特效用统一的方式进行管理对象池: export class EffectA { constructor() { super(); } static create(): EffectA { Pool.getItemByClass(EffectA); } recover(): void { Pool.recoverByClass(this); } } export class EffectB { constructor() { super(); } static create(): Ef...
来源: Laya3.0_文档 发布时间: 20240910
...andler = Laya.Handler; import Stat = Laya.Stat; import WebGL = Laya.WebGL; export class TiledMap_SimpleDemo { private tiledMap: TiledMap; private mLastMouseX: number = 0; private mLastMouseY: number = 0; private mX: number = 0; private mY: number = 0; constructor() { // 不支持WebGL时自动切换...
来源: Laya2.0_示例 发布时间: 20250220
...dler = Laya.Handler; import WebGL = Laya.WebGL; import Event = Laya.Event; export class InputDevice_GluttonousSnake { private seg:Segment; private segments:Array = []; private foods:Array = []; private initialSegmentsAmount:number = 5; private vx:number = 0 private vy:number = 0; private targetPosit...
来源: Laya_示例 发布时间: 20250220
...加如下示例代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.Button }) public btn: Laya.Button; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { thi...
来源: Laya3.0_文档 发布时间: 20240910
... Tab = Laya.Tab; import Handler = Laya.Handler; import WebGL = Laya.WebGL; export class UI_Tab { private skins: Array = ["../../res/ui/tab1.png", "../../res/ui/tab2.png"]; constructor(){ // 不支持WebGL时自动切换至Canvas Laya.init(550, 400, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Lay...
来源: Laya_示例 发布时间: 20250220
...e layaair Options All Public Public/Protected All Inherited Externals Only exported Menu Globals "laya/d3/utils/Physics3DUtils" Physics3DUtils Class Physics3DUtils Physics 类用于简单物理检测。 Hierarchy Physics3DUtils Index Constructors constructor Properties COLLISIONFILTERGROUP_ALLFILTER...
来源: Laya3.0_api 发布时间: 20231115
...nt = Laya.Event; import Browser = Laya.Browser; import WebGL = Laya.WebGL; export class Interaction_Rotate { private sp: Sprite; private preRadian: number = 0; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = S...
来源: Laya2.0_示例 发布时间: 20250220