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

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

311. UI弹窗 · LayaAir3.0文档 · LAYABOX [ 52%]

... const { regClass, property } = Laya; @regClass() export class UI_Dialog extends Laya.Script { private DIALOG_WIDTH: number = 220; private DIALOG_HEIGHT: number = 275; private CLOSE_BTN_WIDTH: number = 43; private CLOSE_BTN_PADDING: number = 5; private assets: any[]; private dialog: Laya.Dialog; con...

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

312. 可以帮我测试一下吗? 使用mask的场景,放着就会出现记忆体用完的讯息? [ 52%]

...有将mask拿掉测试,发现就不会有类似问题。class GameLayer extends ui.GameLayerUI { private infos : any; constructor () { super (); this.infos = { rotation : 0 }; Laya.timer.frameLoop(1,this,()=> { this.infos.rotation += 1; if (this.infos.rotation >= 360) this.infos.rotation -= ...

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

313. 其他引擎的Demo-Example_23 [ 52%]

...rement the ticker tick += 1; } } } import laya.display.Sprite; class Laser extends Sprite { public var life:int; }

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

314. layaFlash 无法使用 Loader 加载外部SWF和图片 [ 52%]

...plicationDomain; import flash.system.LoaderContext; public class SwfBinary extends Sprite { public function SwfBinary() { super(); if(stage) { init(); } else { this.addEventListener(Event.ADDED_TO_STAGE,init); } } private function init(e:Event=null):void { var loader:Loader=new Loader(); var context...

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

315. 要做一个方形倒计时,请问该怎么实现,不知道该怎么做 [ 52%]

...rt laya.display.Sprite; import laya.maths.Rectangle; public class CdSprite extends Sprite { public static const START:int = -90; public static const COLOR:String = "#000000"; private var r:Number = BarCell.WID / Math.SQRT2; private var rect:Rectangle = new Rectangle(0,0,BarCell.WID,BarCell.WID); pri...

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

316. 如何自定义Shader(JavaScript-3D基础(JS)-LayaAir3D之shader) [ 52%]

...BaseMaterial变更为Material。 ```typescript export class CustomMaterial extends Laya.Material { constructor() { super(); //设置本材质使用的shader名字 this.setShaderName("CustomShader"); } } ``` #### 4.使用自定义材质 ​ 在使用自定义材质之前,一定要记得初始化自...

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

317. 位图字体的制作与使用(TypeScript-LayaAir基础篇(TS)-文本) [ 52%]

.../layaMaxUI"; //继承BitmapFont的ui场景类 export default class AllText extends ui.examples.text.BitmapFontUI { //给自己注册的字体起个名 private fontName: string = "diyFont"; constructor() {super();} onAwake(): void { //加载位位图字体 this.loadBitmapFont(); } /** * 实例化位...

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

318. Dialog 第一次打开总是出现在窗口右下角,这是为啥,再打开就正常剧中了? [ 52%]

...个窗口,都是这样,代码如下 export default class SettingDialog extends Laya.Dialog { constructor() { super(); this.loadScene('assets/scenes/dialogs/SettingDialog.scene'); } }{ "x":0, "type":"Dialog", "selectedBox":2, "selecteID":3, "searchKey":"Dialog", "props":{"width":1624,"sceneColor"...

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

319. 关于位图字体的valign属性问题 [ 52%]

...t laya.display.Text; import laya.utils.Handler; public class GraphicCircle extends Sprite { private var mFontName:String="dataFont"; private var mBitmap:BitmapFont; public function GraphicCircle() { super(); Laya.init(550,400); mBitmap=new BitmapFont(); mBitmap.loadFont("date/data.fnt",new Handler(t...

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

320. 龙骨动画的监听回调,有时能回调,有时不能回调 [ 52%]

...dzFarmersAni from "./DdzFarmersAni";  export default class DdzLandlordAni extends SingleBase{   private mFactory: Laya.Templet = null; public isFinish = false; private mArmatureUsed:Array<Laya.Skeleton> = []; private mArmatureUnUsed:Array<Laya.Skeleton> = [];  public static getInstanc...

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