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

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

391. LayaAir IDE 1.4.0新增功能 附加(扩展)脚本的使用 [ 44%]

...逻辑代码package game { import laya.display.Animation; public class Ani extends Animation { private var _isSlow:Boolean=true; public function Ani() { } public function get isSlow():Boolean { return _isSlow; } //isSlow:是否放慢速度 public function set isSlow(value:Boolean):void { _isSlow=v...

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

392. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...示例 const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { private tMap:Laya.TiledMap; onEnable() { //创建地图对象 this.tMap = new Laya.TiledMap(); //创建Rectangle实例,视口区域 var viewRect:Laya.Rectangle = new Laya.Rectangle(0, 0, Laya.stage.desi...

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

393. 其他引擎的Demo-Example_23 [ 43%]

...rement the ticker tick += 1; } } } import laya.display.Sprite; class Laser extends Sprite { public var life:int; }

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

394. 分享:图集资源做位图文本的工具类(知道fontclip组件的可以略过了,之前一直没注意到这个组件) [ 43%]

...况修改。有需要的可以参考下/* * 位图字体; */ class BPFont extends Laya.Sprite { // 文本内容 private _text: string; // 水平排列方式 private _align: string; // 资源前缀 private resFix: string; // 间距 private _padding: number; // 位图集合 private chars: Laya.Sprite ...

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

395. localRotationEulerY旋转位置错误 [ 43%]

...方式实现,比如子弹脚本。  */ export default class GameUI extends ui.test.TestSceneUI {     private mat1: Laya.BlinnPhongMaterial;     private newScene: Laya.Scene3D;     private arr: any;     constructor() {         super();         this.arr...

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

396. 2D线渲染器 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...所以绘制的图形也是在宽高范围内。 */ export class DrawLine extends Laya.Script { declare owner: Laya.Sprite; line2DRender: Laya.Line2DRender; lastMousePos: number[] = []; isDrawing: boolean = false; // 标记是否正在绘制 // 组件被激活后执行,此时所有节点和组件...

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

397. Windows扩展 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

...stLib"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { alert(testLib.nativeAdd(10, 11)); } } 因为LayaNative的扩展功能只支持Windows平台,所以只能通过Windows预览或发布为Windows项目才能得到正确的结果。运行效...

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

398. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 43%]

.../layaMaxUI"; //继承BitmapFont的ui场景类 export default class AllText extends ui.examples.text.BitmapFontUI { //给自己注册的字体起个名 private fontName: string = "diyFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位...

来源: Laya2.0_文档 发布时间: 20210715

399. 2D灯光与网格 · LayaAir3.3 · 引擎文档 · LAYABOX [ 43%]

... const { regClass, property } = Laya; @regClass() export class lightTest extends Laya.Script { declare owner: Laya.Sprite; @property({ type: Laya.Sprite }) light1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh1: Laya.Sprite; @property({ type: Laya.Sprite }) mesh2: Laya.Sprite; private light1Ren...

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

400. 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 [ 43%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { scene3d:Laya.Scene3D; sp:Laya.Sprite3D; sp2:Laya.Sprite3D; translateA = new Laya.Vector3(-0.05, 0, 0); translateD = new Laya.Vector3( 0.05, 0, 0); constructor() { super(); //添加3D场景 var sce...

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