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

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

1361. 组件脚本的内置方法 · LayaAir3.4 · 引擎文档 · LAYABOX [ 51%]

...用等)自动执行相应的方法。 使用示例如下: const { regClass } = Laya; @regClass() export class NewScript extends Laya.Script { //被添加到节点后调用,和Awake不同的是即使节点未激活onAdded也会调用 onAdded(): void { console.log("Game onAdded"); } //组件被...

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

1362. laya.resource.Prefab_API3.0 [ 51%]

...ernals Only exported Menu Globals "laya/resource/HierarchyResource" Prefab Class Prefab Hierarchy Resource Prefab PrefabImpl Index Constructors constructor Properties _id destroyedImmediately lock name url uuid version DEBUG Accessors cpuMemory deps destroyed gpuMemory id obsolute referenceCount cpu...

来源: Laya3.0_api 发布时间: 20231115

1363. 多场景跳转遇到当前场景不能remove的问题 [ 50%]

...ndow.sceneSelectroommultiple); delete window.sceneSelectroommultiple; Laya.class(StartgameUI, "StartgameUI", startgameUI); var sceneStartgame = new StartgameUI(); window.sceneStartgame= sceneStartgame; Laya.stage.addChild(sceneStartgame); 5个场景,4个跳转,前2个正常,后2个不正常,...

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

1364. 2D聚光灯 · LayaAir3.4 · 引擎文档 · LAYABOX [ 50%]

...后,加入下述代码,实现一个2D聚光灯的效果: const { regClass, property } = Laya; @regClass() export class SpotLight extends Laya.Script { @property({ type: Laya.Sprite }) private spotLight: Laya.Sprite; //组件被启用后执行,例如节点被添加到舞台后 onEnable(): voi...

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

1365. 点击拖动图片,当鼠标移出再移回舞台中时如何保持点击状态 [ 50%]

...laya.events.Event; import laya.ui.Image; import laya.utils.Browser; public class TestDemo { private var sp:Sprite; public function TestDemo() { Laya.init(500,500); Laya.stage.bgColor="#EEFFCC"; sp=new Sprite(); sp.graphics.drawRect(0,0,100,50,"#FF0000"); sp.size(100,50); // 设置轴心点为显示...

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

1366. Android替换游戏启动logo看不到设置的图片 [ 50%]

...t laya.net.Loader; import laya.utils.Handler; import view.TestView; public class LayaUISample { private var dd:*; public function LayaUISample() { //初始化引擎 Laya.init(600, 400); //判断是否在加速器端 __JS__("if(window.conch)") { //获取loadingview的实例 dd=__JS__("window.loadingV...

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

1367. 使用2.1.1.1引擎创建的ts小游戏升级2.3.0版本之后无法进入游戏 [ 50%]

...之后无法进入游戏,LayaMaxUI在继承场景时会报一个错 : Class constructor Scene cannot be invoked without 'new' 下附错误截图及demo 附件 : --> testTsgame_2.1_.1_.1_.rar 2019-11-15 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与...

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

1368. 关于大量图片加载绘制后的内存暴增的疑问 [ 50%]

...aya.utils.Handler; import laya.utils.Stat; import laya.webgl.WebGL; public class Demo { private var num:Number=0;//加载图片的个数 private var sp:Sprite;//显示图片的显示对象容器 private var texture:Texture;//预加载图片的纹理 public function Demo() { Laya.init(800,1000,WebGL)...

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

1369. 使用typescript开发项目,解决文件引用顺序问题 [ 50%]

...rld.js' Laya.stage.addChild(new HelloWorld) //HelloWorld.ts export default class HelloWorld extends Laya.Text { constructor(){ super() this.text = "Hello Layabox" this.color = '#ffffff' } }   2017-11-20 添加评论 免费帖 --> 分享 微博 QZONE 微信 没有找到相关结果 已邀请: 与内...

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

1370. laya.d3.animation.AnimationClip_API3.0 [ 50%]

...Only exported Menu Globals "laya/d3/animation/AnimationClip" AnimationClip Class AnimationClip AnimationClip 类用于动画片段资源。 Hierarchy Resource AnimationClip Index Constructors constructor Properties _id destroyedImmediately islooping lock name url uuid DEBUG Accessors cpuMemory destr...

来源: Laya3.0_api 发布时间: 20231115