大约有 6 项符合查询结果, 库内数据总量为 31,560 项。 (搜索耗时: 0.0028 秒)
...编码的文件。 3. 日志级别 LayaNative底层LOG分为五种: enum class LogType { Debug, Info, Warn, Error, Fatal, }; 每种日志对应的日志级别如下: enum class LogLevel { Debug = 5, Info = 4, Warn = 3, Error = 2, Fatal = 1, Close = 0, }; 在js脚本中,开发者可以通过以...
来源: Laya3.0_文档 发布时间: 20251010
...。以给Image组件添加皮肤为例,示例代码如下: const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onAwake(): void { let img = new Laya.Image; Laya.stage.addChild(img); img.pos(500,100); img.skin = "resources/layabox.png"; //纹理压缩的图片...
来源: Laya3.0_文档 发布时间: 20251010
...Main.ts中添加代码: import { testLib } from "./TestLib"; const { regClass, property } = Laya; @regClass() export class Main extends Laya.Script { onStart() { alert(testLib.nativeAdd(10, 11)); } } 因为LayaNative的扩展功能只支持Windows平台,所以只能通过Windows预览或发布...
来源: Laya3.0_文档 发布时间: 20251010
...;<p>p</p><img src='res/boy.png'></img>"; */ export class HTMLDivElement extends Sprite { 下面我们通过一些示例代码来看看运行效果: 3.1 同一个文本中设置Bold、Font、FontSize、Color、下划线 【注意:目前不支持斜体、描边、span标签...
来源: Laya3.0_文档 发布时间: 20230303
...码如下: import { IndexRTBase } from "./IndexRT.generated"; const { regClass } = Laya; @regClass() export default class IndexRT extends IndexRTBase { onAwake(): void { //设置舞台设计宽高 Laya.stage.designWidth = 1080; Laya.stage.designHeight = 1920; //在引擎初始化之后改变舞台...
来源: Laya3.0_文档 发布时间: 20251010
...意基类必须和预制体根节点类型匹配,一般都是GButton。 class MyItem extends Laya.GButton { //注意!在onConstruct里才可以获取子对象,建议在这里做初始化,不要在构造函数里做初始化 onConstruct() { //this.xx = this.getChild("xx"); //this.xx.on(Laya.E...
来源: Laya3.0_文档 发布时间: 20251128