大约有 401 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0058 秒)
...以写一个Tool工具类,方便转换使用: //Tool工具类 export class Tool { private static transVertex0: Laya.Vector3 = new Laya.Vector3(); private static transVertex1: Laya.Vector3 = new Laya.Vector3(); private static transVertex2: Laya.Vector3 = new Laya.Vector3(); private static corners...
来源: Laya3.0_文档 发布时间: 20251010
...itle预制体放到Box下 (动图3-5) 示例代码如下: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预...
来源: Laya3.0_文档 发布时间: 20241014
...下添加一个自定义组件脚本,并添加如下代码: const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2...
来源: Laya3.0_文档 发布时间: 20251010
...73741824; const TiledMapFlipConstHalf = TiledMapFlipConst / 2; class GridSprite extends Laya.Sprite { constructor() { super(...arguments); this.relativeX = 0; this.relativeY = 0; this.isAloneObject = fals...
来源: Laya_社区 发布时间: 20220627
...itle预制体放到Box下 (动图3-5) 示例代码如下: const { regClass, property } = Laya; @regClass() export class ScriptA extends Laya.Script { //declare owner : Laya.Sprite3D; @property( { type: Laya.Box } ) private box: Laya.Box; constructor() { super(); } onStart(): void { //加载预...
来源: Laya3.0_文档 发布时间: 20251105
...真阅读文章,现在改成在具体的使用说明: 主域:public class LayaUISample { public function LayaUISample() { //微信小游戏适配库初始化 MiniAdpter.init(true,false); //初始化引擎 Laya.init(640, 480,WebGL); Laya.stage.scaleMode = Stage.SCALE_FIXED_HEIGHT; Laya.stage.bg...
来源: Laya_社区 发布时间: 20180525
组件装饰器标识的详细说明1、识别组件脚本 @regClass()1.1 代码中如何使用 @regClass()1.2 IDE中如何找到被识别的组件脚本2、识别组件 @property()2.1 组件属性的常规使用2.2 访问器的装饰器使用2.3 是否序列化保存 serializable2.4 是否为私...
来源: Laya3.0_文档 发布时间: 20251010
...5%9F%9F%E5%BC%80%E5%8F%91/image-20190307200032836.png?lastModify=1551962708class Main { constructor() { //设置子域 Laya.isWXOpenDataContext = true; Laya.isWXPosMsg = true; //根据IDE设置初始化引擎 Laya.init(GameConfig.width, GameConfig.height,false); Laya.stage.scaleMode = GameConfig.sca...
来源: Laya_社区 发布时间: 20190307
...用等)自动执行相应的方法。 使用示例如下: const { regClass } = Laya; @regClass() export class NewScript extends Laya.Script { //被添加到节点后调用,和Awake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //组件被...
来源: Laya3.0_文档 发布时间: 20251010
...qianxiao * @Date: 2017/12/25 * @Time: 下午3:52 * @Desc: 字体样式 **/ class TextFormat implements ITextFormat { /** * 背景色 */ bgColor: string; /** * 是否加粗 */ bold: number; /** * 文本框背景色 */ borderColor: string; /** * 文本颜色 */ color: string; /** * 字体 */ font: str...
来源: Laya_社区 发布时间: 20171226