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

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

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

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

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

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

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

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

...个窗口,都是这样,代码如下 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

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

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

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

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

326. 动画混合问题,Avatar动画混合报错. [ 50%]

.../被扔 dizziness = 'dizziness',//眩晕 }  export default class RoleBase extends Laya.Script3D{ public nGrade:number = 0; public nSpeed:number = 5;  public sprite:Laya.Sprite3D = null;  public animator:Laya.Animator = null;  public Init(){ this.sprite = this.owner as Laya.Sprite3D; this.animato...

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

327. 分享一个自己做的游戏公告功能,跑马灯效果 [ 49%]

....Sprite import Box = Laya.Box /** 公告栏 */ export default class Notice extends View { /** 滚动区域 */ hornBox: Box /** html对象 */ html: HTMLDivElement /** 滚动框的宽度 */ defaultX = 1110 /** 动画是否出于播放状态 */ isPlayIng:boolean = false /** 空格 */ private space:stri...

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

328. 2.0里面的组件(Laya.Script)的prop其中几个类型应该怎么设置 [ 49%]

...其他的类型的范例供大家参考   export default class TestScript extends Laya.Script { /** @prop {name:intType, tips:"整数类型示例", type:Int, default:1000}*/ public intType: number = 1000; /** @prop {name:numType, tips:"数字类型示例", type:Number, default:1000}*/ public numTyp...

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

329. typeScript Java互调问题 [ 49%]

...———————————————— public class MainActivity extends Activity{          private IPlugin mPlugin = null;     private IPluginRuntimeProxy mProxy = null;     boolean isLoad=false;     boolean isExit=false;     private WebView webView = null;     private Acti...

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

330. 性能测试-虫子(慎入) [ 49%]

...t.pos(x, y); } tick += 0.1; } } } import laya.display.Sprite; class Maggot extends Sprite { public var direction:Number; public var turningSpeed:Number; public var speed:Number; public var offset:Number; }

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