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

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

21. Laya 绑定显示内容到骨骼动画 [ 77%]

...1. 可绑定内容的骨骼动画   export default class BindSkeleton extends Laya.Skeleton { private __bindList:BindSource[]; constructor(){ super(); this.__bindList=[]; }  /** * 绑定 * @param source */ bind(source:BindSource):void{ let index:number=this.__bindList.indexOf(source); if(...

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

22. Sprite用graphics绘制图形后,mouse_over触发scale显示有问题 [ 76%]

...了个例子,发现个新问题 import Sprite = Laya.Sprite; class Test extends Sprite{ constructor(){ super(); this._initView(); } private _initView():void { let sprite:Sprite = new Sprite(); sprite.loadImage("res/scene/1001/layer1/qiang.jpg", 100, 100, 100, 100); this.addChild(sprite); sprite = ...

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

23. 怎样复制bmf字体 [ 74%]

...bel使用的并不是 ide中自己做的bmf字体。    class cloneLabel extends Laya.Label { constructor(_label) { super(); this.align = _label.align; this.x = _label.x; this.y = _label.y; this.width = _label.width; this.height = _label.height; this.fontSize = _label.fontSize; this.color = _label...

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

24. 组件装饰器说明 · LayaAir3.0文档 · LAYABOX [ 74%]

...如下所示: const { regClass } = Laya; @regClass() export class Script extends Laya.Script { } 如动图1-1所示,只有使用了上述的这个装饰器标识,开发者自定义的组件脚本才会被IDE识别为组件,可以被节点(实体)的属性设置面板 -> 增加组件 -...

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

25. 性能测试-卡通人物2 [ 73%]

...Frame % 60 === 0) { text.text = Stat.FPS.toString(); } } } class Character extends Laya.Sprite { constructor(images) { super(); this.speed = 5; this.bloodBar; this.animation; this.nameLabel; this.createAnimation(images); this.createBloodBar(); this.createNameLabel(); } createAnimation(images) { cons...

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

26. 多个文件之间相互import,运行时报错 [ 72%]

...ull: undefined preload.js:55 at setPrototypeOf (<anonymous>)   at __extends (file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:6:9)   at file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:41201:5   at Object.172.../GameManager (file:///E:/SVN/ZQ2/client2.0/bin/js/bundle.js:41206:2)   at o (file:///...

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

27. must set document class! [ 72%]

...ss laya.html.dom.HTMLDivElement Uncaught 无法实例class PhysicsCollider extends PhysicsTriggerComponent Uncaught Can not find class laya.ani.bone.Skeleton 脚本重命名后报Uncaught Can not find class 错误 发布微信小游戏运行错误,Class constructor xx cannot be invoked without 'ne...

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

28. UI运行时 · LayaAir3.0文档 · LAYABOX [ 72%]

...} from "./RuntimeScript.generated"; @regClass() export class RuntimeScript extends RuntimeScriptBase { onAwake(): void { // Button添加鼠标事件,让Image不显示 this.Button.on( Laya.Event.MOUSE_DOWN, this, ()=>{ this.Image.visible = false; }); } } 其次,可以在Scene2D节点下添加...

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

29. 字体切片组件 · LayaAir3.0文档 · LAYABOX [ 72%]

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

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

30. viewportPointToRay产生的射线始终有偏差,是为什么? [ 72%]

...Vector4; import WebGLContext = Laya.WebGLContext; export class SceneScript extends Script { private _originPosition:Vector3 = new Vector3(0, -1, 1); private _phasorSpriter3D:PhasorSpriter3D; private _color:Vector4 = new Vector4(1, 0, 0, 1); private _point:Vector2 = new Vector2(); private _camera:Cam...

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