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

大约有 443 项符合查询结果, 库内数据总量为 30,724 项。 (搜索耗时: 0.0038 秒)

191. 单选框组组件 · LayaAir3.0文档 · LAYABOX [ 58%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { @property({ type: Laya.RadioGroup }) public radiogroup: Laya.RadioGroup; //组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { this.radiogr...

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

192. 为什么全局属性赋值后,在另外个函数中调用会自动变成undefined [ 57%]

...个函数中调用会自动变成undefined public class MainPageController extends Scene {                  public var camera:Camera;                  public function MainPageController(){             super();             Laya.stage.scaleMode =...

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

193. 如何自定义一个类实现类似List的功能的Grid [ 57%]

...实现类似List的功能的Grid,下面是List的官方代码 class List extends Box implements IRender, IItem { /**改变 <code>List</code> 的选择项时执行的处理器,(默认返回参数: 项索引(index:number))。*/ selectHandler: Handler; /**单元格渲染处理器(...

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

194. 在Unity中设置动画事件(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 57%]

...这里是随便取的名。 ```typescript export default class SceneScript extends Laya.Script3D { constructor(){ super(); //用于表现的方法 this.showMsgFunc = null; } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg() { console.log("ShowMsg"); th...

来源: Laya2.0_文档 发布时间: 20210715

195. 求助高手请进,关于场景导入的问题~ [ 57%]

... = new GameScene(); Laya.stage.addChild(scene1);   public class GameScene extends Scene {    public function GameScene()    {       Laya.loader.create("LayaScene_01/loveScene.ls",Handler.create(this,this.completeHandler));    }          private function completeHandler():void{     ...

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

196. MovieClip is not a constructor [ 57%]

...Laya.Sprite; import MovieClip=Laya.MovieClip; export class SpriteSheetTest extends Sprite{ constructor() { super(); let mc:MovieClip=new MovieClip(); } } 就这点代码,运行后就报错 2017-07-19 0 1 分享 微博 QZONE 微信 为什么被折叠? 0 个回复被折叠 该问题目前已经被...

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

197. 取色器组件 · LayaAir3.0文档 · LAYABOX [ 57%]

...nst { regClass, property } = Laya; @regClass() export class UI_ColorPicker extends Laya.Script { private skin: string = "atlas/comp/colorPicker.png"; constructor() { super(); } // 组件被激活后执行,此时所有节点和组件均已创建完毕,此方法只执行一次 onAwake(): void { La...

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

198. 在Unity中设置动画事件(TypeScript-3D基础(TS)-LayaAir3D之Animator动画) [ 57%]

...这里是随便取的名。 ```typescript export default class SceneScript extends Laya.Script3D { //用于表现的方法 public showMsgFunc; constructor(){ super(); } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.sho...

来源: Laya2.0_文档 发布时间: 20210715

199. 预制体模块 · LayaAir3.0文档 · LAYABOX [ 57%]

...: 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 { //加载预制体文件 Laya.loader.load("resources/Title.lh").then( (r...

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

200. 已经在vs上引用相关的类,编译后bundle.js却没有相关的代码 [ 57%]

...然后在其他类里面继承。并导包。export default class xxxx extends SDispatcher{},在vs里面没有发现报错。进行指令编译后,运行bundle.js。却提示Uncaught ReferenceError: SDispatcher is not defined. 我也尝试过 去掉 default ,都一样 2020-08-17 添加评...

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