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

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

141. 2.0版本可用的CameraMoveScript.ts [ 51%]

...一样的文件:   /** * ... * @author */ export class CameraMoveScript extends Laya.Script {      /** @private */     protected _tempVector3: Laya.Vector3 = new Laya.Vector3();     protected lastMouseX: number;     protected lastMouseY: number;     protected yawPitchRoll: La...

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

142. 2D精灵光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

... const { regClass, property } = Laya; @regClass() export class SpriteLight extends Laya.Script { @property({type: Laya.Sprite}) private spriteLight: Laya.Sprite; @property({type: Laya.Sprite}) private directLight: Laya.Sprite; @property({type: Laya.Sprite}) private background: Laya.Sprite; //组件...

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

143. 2D自由形态光 · LayaAir3.3 · 引擎文档 · LAYABOX [ 51%]

...下: const { regClass } = Laya; @regClass() export class LightEffectDemo extends Laya.Script { declare owner: Laya.Sprite; private lightComp: Laya.FreeformLight2D; private rotateSpeed: number = 2; // 增加旋转速度 private scaleTime: number = 0; private scaleSpeed: number = 3; // 增加缩放...

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

144. 如何启用摇一摇 [ 51%]

...TextField; import flash.text.TextFieldAutoSize; public class Shake_A_Shake extends Sprite { private var acc1:Accelerometer; private var oldAccX:Number; private var oldAccY:Number; private var oldAccZ:Number; private var sum:Number; private var txt:TextField; public function Shake_A_Shake() { this.ad...

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

145. 动画实例在调用含有名字参数的时候获取不到边界 [ 50%]

...: 2 人 198*****136 • 2020-09-11 16:34 export default class Scene_Battle extends Laya.Script{ playerUnitReady:number; enemyUnitReady:number; private playerUnit:Laya.Animation[]; private enemyUnit:Laya.Animation[]; constructor(){ super(); Laya.stage.alignH= Laya.Stage.ALIGN_CENTER; Laya.stage.align...

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

146. 基础使用与构成 · LayaAir3.3 · 引擎文档 · LAYABOX [ 48%]

...ted"; const { regClass, property } = Laya; @regClass() export class Script extends ItemBoxBase { constructor() { super(); } get dataSource(): any { return super.dataSource; } set dataSource(value: any) { super.dataSource = value; if (!value) return; //把数据源里的值,给到子节点属性 if...

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

147. TiledMap地图 · LayaAir3.3 · 引擎文档 · LAYABOX [ 47%]

...示例 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_文档 发布时间: 20251010

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

...逻辑代码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

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

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

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

150. Windows扩展 · LayaAir3.3 · 引擎文档 · LAYABOX [ 46%]

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

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