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

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

751. 取色器组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...。示例代码如下: const { regClass, property } = Laya; @regClass() export class UI_ColorPicker extends Laya.Script { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行...

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

752. List属性详解(TypeScript-IDE篇(TS)-IDE组件属性详解) [ 59%]

...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

753. 网络和格式-GET [ 59%]

...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

754. 对象池 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...,我们可以对每个特效用统一的方式进行管理对象池: 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

755. 区块地图-滚动地图 [ 59%]

...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

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

...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

757. 按钮组件 · LayaAir3.3 · 引擎文档 · LAYABOX [ 59%]

...加如下示例代码: 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

758. UI-Tab [ 59%]

... 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

759. laya.d3.utils.Physics3DUtils_API3.0 [ 59%]

...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

760. 鼠标交互-双指旋转(多点触控) [ 59%]

...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