大约有 178 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0042 秒)
...一样的文件: /** * ... * @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
... 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
...下: 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
...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
...: 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
...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
...示例 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
...逻辑代码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
...所以绘制的图形也是在宽高范围内。 */ export class DrawLine extends Laya.Script { declare owner: Laya.Sprite; line2DRender: Laya.Line2DRender; lastMousePos: number[] = []; isDrawing: boolean = false; // 标记是否正在绘制 // 组件被激活后执行,此时所有节点和组件...
来源: Laya3.0_文档 发布时间: 20251010
...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