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

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

381. 网络通信 · LayaAir3文档 · LAYABOX [ 37%]

...备发送请求的功能。我们写个简单的例子来看下用法: class LayaSample { constructor() { //创建HttpRequest对象 let http: Laya.HttpRequest = new Laya.HttpRequest(); //设置超时时间 http.http.timeout = 10000; //发送了一个简单的请求 http.send("resources/data.txt", ...

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

382. UI-RefreshList [ 37%]

...ya.Text; Point = Laya.Point; Tween = Laya.Tween; TextArea = Laya.TextArea; class UI_RefreshList { constructor() { this.baseBox = null; this.refreshLoading = null; this.loadingAni = null; this.loadingLabel = null; this.refreshList = null; /** 消息生成的当前最大id值 */ this.msgIdNow=1; /** ...

来源: Laya2.0_示例 发布时间: 20251130

383. 动画状态机 · LayaAir3.3 · 引擎文档 · LAYABOX [ 37%]

...,添加的代码如下: ... import Vector3 = Laya.Vector3; ... export class AnimationScript extends Laya.AnimatorStateScript { ... private model: Laya.Sprite3D; /**@internal */ setPlayScriptInfo(animator: Laya.Animator | Laya.Animator2D, layerindex: number, playstate: Laya.AnimatorState | Laya.A...

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

384. 实体组件系统 · LayaAir3.3 · 引擎文档 · LAYABOX [ 36%]

...讲解生命周期方法,以下是此脚本文件的代码: const { regClass, property } = Laya; /** * 子弹脚本,实现子弹飞行逻辑及对象池回收机制 */ @regClass() export default class Bullet extends Laya.Script { constructor() { super(); } onEnable(): void { //设置初始速...

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

385. 在父sprite中添加子sprite ,移动父Sprite 子sprite为什么不动? [ 34%]

...); // 名字 this.name = "gemini"; this.init(); } // 注册类 IsLand Laya.class(IsLand,"IsLand",laya.display.Sprite); // 原型 var _proto = IsLand.prototype; // 初始化 _proto.init = function(){ // 球体 this.ball = new Sprite(); // 城堡 this.tower = new Sprite(); // 飞艇 this.aeroboat = ne...

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

386. vivo小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 33%]

...。 如果是代码引用资源,加载代码示例如下: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执行...

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

387. 十几秒以后动画渲染时间变长,帧率变慢,是怎么回事? [ 32%]

...*************************************************************************/ class DollGunRole extends GunRole{  public _box: GunBox; // toset: /** 飞行的范围, 用于计算飞行路径 */ private _fly_site:Site = new SiteEntity( 10, 10, -1, 400 );  public static _ani_cached:boolean = false;  /...

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

388. 分享,扩展Laya.Text组件实现简单的富文本 [ 31%]

...类的排版和渲染函数以实现自定义的富文本类型) */ export class Label extends Laya.Text { constructor() { super(); } private typeList = {}; //取出文本里面的关键字 private typeIndexList = ; //关键字所在文本的位置 private typeLines = ; //利用关键字重新划分...

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

389. 微信小游戏 · LayaAir3.3 · 引擎文档 · LAYABOX [ 31%]

...适用。下面给出一段代码加载分包的示例代码: const { regClass, property } = Laya; @regClass() export class Script extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Scene3D }) scene3d: Laya.Scene3D; constructor() { super(); } /** * 组件被激活后执...

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

390. laya.ui.Tree_API3.0 [ 30%]

...ted All Inherited Externals Only exported Menu Globals "laya/ui/Tree" Tree Class Tree Tree 控件使用户可以查看排列为可扩展树的层次结构数据。 example package { import laya.ui.Tree; import laya.utils.Browser; import laya.utils.Handler; public class Tree_Example { public function...

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