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

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

2621. laya.ui.TextArea_API3.0 [ 25%]

... example 以下示例代码,创建了一个 TextArea 实例。 package { import laya.ui.TextArea; import laya.utils.Handler; public class TextArea_Example { public function TextArea_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景...

来源: Laya3.0_api 发布时间: 20231115

2622. 组件脚本的内置方法 · LayaAir3.4 · 引擎文档 · LAYABOX [ 23%]

...法的使用,示例代码如下: const { regClass, property } = Laya; import PhysicsGameMainRT from "../scence/physicsDemo/PhysicsGameMainRT"; /** * 掉落盒子脚本,实现盒子碰撞及回收流程 */ @regClass() export default class DropBox extends Laya.Script { /**盒子爆炸动画的...

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

2623. laya.display.Sprite_API3.0 [ 22%]

...又达到高性能。 example 创建了一个 Sprite 实例。 package { import laya.display.Sprite; import laya.events.Event; public class Sprite_Example { private var sprite:Sprite; private var shape:Sprite public function Sprite_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染...

来源: Laya3.0_api 发布时间: 20231115

2624. 屏幕适配 · LayaAir3.4 · 引擎文档 · LAYABOX [ 22%]

...ge.designWidth和Laya.stage.designHeight来设置。 示例代码如下: import { IndexRTBase } from "./IndexRT.generated"; const { regClass } = Laya; @regClass() export default class IndexRT extends IndexRTBase { onAwake(): void { //设置舞台设计宽高 Laya.stage.designWidth = 1080; Laya.sta...

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

2625. laya.ui.Clip_API3.0 [ 20%]

...。 example 以下示例代码,创建了一个 Clip 实例。 package { import laya.ui.Clip; public class Clip_Example { private var clip:Clip; public function Clip_Example() { Laya.init(640, 800);//设置游戏画布宽高。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(...

来源: Laya3.0_api 发布时间: 20231115

2626. 动画状态机 · LayaAir3.4 · 引擎文档 · LAYABOX [ 15%]

...CubeAnimation动画节点添加动画脚本,添加的代码如下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: num...

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

2627. 组件装饰器说明 · LayaAir3.4 · 引擎文档 · LAYABOX [ 15%]

...面这两个TS代码: //MyScript.ts const { regClass, property } = Laya; import Animal from "./Animal"; @regClass() export class MyScript extends Laya.Script { @property({ type : Animal }) animal : Animal; } //Animal.ts const { regClass, property } = Laya; @regClass() export default class Animal {...

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

2628. laya.ui.Radio_API3.0 [ 14%]

...建了一个 Button 实例,并设置为切换按钮。 example package { import laya.ui.Button; import laya.utils.Handler; public class Button_toggle { public function Button_toggle() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布...

来源: Laya3.0_api 发布时间: 20231115

2629. laya.ui.Label_API3.0 [ 14%]

...。 example 以下示例代码,创建了一个 Label 实例。 package { import laya.ui.Label; public class Label_Example { public function Label_Example() { Laya.init(640, 800);//设置游戏画布宽高、渲染模式。 Laya.stage.bgColor = "#efefef";//设置画布的背景颜色。 onInit(); }...

来源: Laya3.0_api 发布时间: 20231115

2630. 3D物理系统 · LayaAir3.4 · 引擎文档 · LAYABOX [ 12%]

...建的TSDemo脚本。示例代码如下: //引入自定义脚本TSDemo import TSDemo from "./TSDemo"; /** * TypeScript语言示例 */ export default class GameUI extends GameUIBase { /* ……省略若干代码 */ private addBox(): void { //创建盒型体 let box = new Laya.Sprite3D; let boxMesh ...

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