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

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

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

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

172. 精灵 · LayaAir3.0文档 · LAYABOX [ 55%]

... const { regClass, property } = Laya; @regClass() export class NewScript extends Laya.Script { //declare owner : Laya.Sprite3D; @property({ type: Laya.Sprite }) public sprite1: Laya.Sprite; @property({ type: Laya.Sprite }) public sprite2: Laya.Sprite; constructor() { super(); } /** * 组件被激活...

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

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

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

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

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

175. 碰撞检测 outHitInfo.distance 一直等于 -1 ?(TS代码) [ 54%]

...直等于-1?  -------------------------------- class RoleControlScript extends Laya.Script{ /*角色模型*/ public roleModel:Laya.Sprite3D; /*角色动画组件*/ public roleAni:Laya.Animator; /*角色当前动作*/ public currentAction:string = "stand"; /*角色动画是否完成*/ public aniCo...

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

176. localRotationEulerY旋转位置错误 [ 54%]

...方式实现,比如子弹脚本。  */ export default class GameUI extends ui.test.TestSceneUI {     private mat1: Laya.BlinnPhongMaterial;     private newScene: Laya.Scene3D;     private arr: any;     constructor() {         super();         this.arr...

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

177. 路径显示会添加DrawCall,每增加一条路径都会添加,有什么办法降DrawCall [ 54%]

...ndler; import ui.TestDialogUI; import ui.TestViewUI; public class TestView extends TestViewUI { private var PATH_LEN:Number = 120.0; private var speed:Number = 15; private var _path:Sprite = new Sprite(); private var _path2:Sprite = new Sprite(); private var arr:Array = ; private var arr2:Array = ; ...

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

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

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

179. 请大家帮助优化一下这个抛物线的代码 [ 54%]

...望大家指正 https://my.oschina.net/u/659068/blog/1564002  class Ball extends Laya.Sprite{ private static cached:boolean = false; private body:Laya.Sprite; constructor(){ super(); this.init(); } public init():void{ if(!Ball.cached){ Ball.cached = true; this.body = new Laya.Sprite(); this.body.l...

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

180. 3d显示对象克隆体超出舞台不再显示的bug2.1.0.btea1 [ 53%]

...脚本方式实现,比如子弹脚本。 */ export default class GameUI extends ui.test.TestSceneUI { scene3d:Laya.Scene3D; sp:Laya.Sprite3D; sp2:Laya.Sprite3D; translateA = new Laya.Vector3(-0.05, 0, 0); translateD = new Laya.Vector3( 0.05, 0, 0); constructor() { super(); //添加3D场景 var sce...

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