大约有 175 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0038 秒)
...{ 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; // 增加缩放速度 private...
来源: Laya3.0_文档 发布时间: 20251010
...lass, 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
...***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.alignV = Laya.Stag...
来源: Laya_社区 发布时间: 20200910
....generated"; 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; //把数据源里的值,给到子节点...
来源: Laya3.0_文档 发布时间: 20251010
... { 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.designWidth, Lay...
来源: Laya3.0_文档 发布时间: 20251010
...的图形也是在宽高范围内。 */ export class DrawLine extends Laya.Script { declare owner: Laya.Sprite; line2DRender: Laya.Line2DRender; lastMousePos: number[] = []; isDrawing: boolean = false; // 标记是否正在绘制 // 组件被激活后执行,此时所有节点和组件均已创建...
来源: Laya3.0_文档 发布时间: 20251010
...文件。 在LayaExtInit函数中,导出上面这些函数,使得JavaScript代码可以调用这些原生功能。 extern "C" { LAYAEXTAPI void LayaExtInit(jsvm_env env, jsvm_value exp) { //注册新的函数 jsvm_value fn; jsvm_create_function(env, "testAdd", SIZE_MAX, jsAdd, nullptr, &fn);...
来源: Laya3.0_文档 发布时间: 20251010
...gClass, 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 light1Render: Laya.F...
来源: Laya3.0_文档 发布时间: 20251010
...e_JJF/Conventional/JJF.lh"); layaMonkey.addComponent(MonkeyScript); camera.transform.lookAt(layaMonkey.transform.position, new Laya.Vector3(0, 1, 0)); //设置文本显示框位置 this.text.x = Laya.stag...
来源: Laya_社区 发布时间: 20190531
...ance 一直等于-1? -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ publ...
来源: Laya_社区 发布时间: 20171113