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

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

201. 动画状态脚本(JavaScript-3D基础(JS)-LayaAir3D之Animator动画) [ 65%]

...AnimatorStateScriptTest extends Laya.AnimatorStateScript { constructor() { super(); this._text = null; } get text() { return this._text; } set text(value) { this._text = value; } /** * 动画状态开始时执行。 */ onStateEnter() { console.log("动画开始播放了"); this._text.text = "动画...

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

202. [LayaAir2]字节小游戏物理的坐标不一样,碰撞盒会比laya的小,物理的位置也不一样 [ 65%]

... Laya.Script {         strWorldRoot:Laya.Sprite;     constructor() { super(); }     cameraPlayerOffset:Laya.Point=new Laya.Point(18,0);     cameraOffset:Laya.Point=new Laya.Point(180,570);     onEnable(): void {         Laya.Physics.I.allowSleeping = false;         this.strWorldR...

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

203. 发光滤镜二次渲染bug [ 65%]

...      }                 }             }             super._setDisplay(value);         }   而二次渲染时使用了这个值; tIsHaveGlowFilter = sprite._cacheStyle.hasGlowFilter || false;                 if (tIsHaveGlowFilter) {                     ...

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

204. Animation未释放资源的引用 [ 65%]

... 先上源码 destroy(destroyChild: boolean = true): void { this.stop(); super.destroy(destroyChild); this._frames = null; this._labels = null; }animation的destory方法,只是将_frames赋值为null,并没有对_frames的graphics进行destroy, 这样会导致动画的图集引用计数不会...

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

205. ja语言怎么样创建一个工具类在其他地方调用 [ 65%]

...要写一个工具类进行一些逻辑的处理 var Load_ = (function (_super) { function Load_() { Load_.super(this); } //注册类 Laya.class(Load_, "Load_", _super); var _proto = Load_.prototype; _proto.run_Fast = function () { console.log("逻辑处理"); } return Load_; })(Laya.Sprite);我的...

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

206. 自己创建的box作为tab,为啥没有点击事件啊? [ 65%]

...Class();     Laya.stage.addChild(UI); } function MyBoot() {     MyBoot.super(this);     this.MyTab.selectHandler = new Laya.Handler(this, onSelect, null, false);//设置 tab 的选择项发生改变时执行的处理器。     console.log("A123");     function onSelect(index)     {   ...

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

207. 缓动-缓动函数演示 [ 65%]

...Laya.Label; function ListItemRender() { var label = null; ListItemRender.__super.call(this); this.size(100, 20); label = new Label(); label.fontSize = 12; label.color = "#FFFFFF"; this.addChild(label); this.setLabel = function(value) { label.text = value; } } Laya.class(ListItemRender, "ListItemRend...

来源: Laya_示例 发布时间: 20260929

208. 使用方向键 控制精灵在格子中移动 [ 65%]

...9553 赞同来自: 多谢分享 2017-11-25 0 0 分享 微博 QZONE 微信 6super 赞同来自: 版主您好!我最近也在学用AS语言做飞机大战,看了您的代码,优点是:可以几个方向键一起用,但是,如果按下一个方向不放开的话,人物的移动会一直...

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

209. 在UI类里调用启动类的静态函数失败了 [ 65%]

...odule view { export class GameInfo extends ui.GameInfoUI { constructor() { super(); this.kaishi_btn.on(Laya.Event.MOUSE_DOWN, this, this.onStart); // Laya.stage.on(Laya.Event.MOUSE_DOWN, this, this.birdFly);//可以绑定两个函数 Laya.stage.on(Laya.Event.KEY_DOWN, this, this.birdFly); this.init(...

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

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

...Laya.Script3D { //用于表现的方法 public showMsgFunc; constructor(){ super(); } //对应unity添加的AnimationEvent的动画事件函数,名字是可以对应上的 ShowMsg(){ console.log("ShowMsg"); this.showMsgFunc && this.showMsgFunc(); } } ``` 在加载好场景之后,我们将我们...

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