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

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

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

... 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

12. 缓动-缓动函数演示 [ 85%]

...3); input.inputElementYAdjuster = 1; return input } } class ListItemRender extends Laya.Box { constructor() { super(); const Label = Laya.Label; this.size(100, 20); this.label = new Label(); this.label.fontSize = 12; this.label.color = "#FFFFFF"; this.addChild(this.label); } setLabel(value) { this.l...

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

13. 实体组件系统 · LayaAir3.0文档 · LAYABOX [ 85%]

...逻辑及对象池回收机制 */ @regClass() export default class Bullet extends Laya.Script { constructor() { super(); } onEnable(): void { //设置初始速度 let rig: Laya.RigidBody = this.owner.getComponent(Laya.RigidBody); rig.setVelocity({ x: 0, y: -10 }); } onTriggerEnter(other: any, self: ...

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

14. 性能测试-卡通人物2 [ 85%]

...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_示例 发布时间: 20240930

15. laya.filters.IFilterActionGL [ 85%]

...s | Methods Packagelaya.filtersInterfacepublic interface IFilterActionGL extends IFilterActionImplementors ColorFilterActionGL, FilterActionGLPublic Properties PropertyDefined By  typeMix : int[read-only] IFilterActionGLPublic Methods Hide Inherited Public Methods Show Inherited Public Methods...

来源: laya_api 发布时间: 20170929

16. LayaFlash如何使用chrome调试问题? [ 84%]

... import flash.display.Sprite; import flash.events.Event; public class Main extends Sprite { public function Main() { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(event:Event = null):void { removeEventListener(Event.ADDED_TO_STAGE, init); IFlash.setSiz...

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

17. 关于要自定shader的同学 [ 83%]

...的参照shader原文档 2.要修改shader里面的值 class ShaderValue extends Laya.Value2D {class ShaderValue extends Laya.Value2D { constructor () { super(0, 0) var _vlen = 8 * Laya.CONST3D2D.BYTES_PE this.position = [2, Laya.WebGLContext.FLOAT, false, _vlen, 0] this.texcoord = [2, Laya.WebGLCon...

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

18. ProgressBar 代码问题 [ 83%]

...}); 进度条代码: import Handler = Laya.Handler; export class Onloading extends ui.LoadingUI{        constructor(){        super();        this.loadingBar.changeHandler = new Handler(this, this.onChange); } public changeValue():void{        console.log("change");        if (th...

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

19. 动效问题,没有 ui.TestPUI,官方文档是错的,几年了至今无解答 [ 82%]

...Laya.Scene; var REG = Laya.ClassUtils.regClass; export class kick_effectUI extends EffectAnimation { //然后又改成Laya.EffectAnimation constructor(){ super(); this.ani1=null; this.effectData =ui.kick_effectUI.uiView;; } } kick_effectUI.uiView={"type":"View","props":{},"compId":2,"child":[{"type"...

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

20. 使用3DUI · LayaAir3.0文档 · LAYABOX [ 82%]

...nerated"; import { Main } from "./Main"; @regClass() export class BloodBar extends BloodBarBase { onAwake(): void { this.bar.value = 1; this.value.visible = false; Laya.stage.on( Laya.Event.CLICK, this, this.onHurt ); } onHurt(): void { this.bar.value = this.bar.value - 0.1; this.value.y = 35; this....

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