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

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

1. ts加密md5码封装 [ 100%]

...):Md5 { return this._inst ||(this._inst = new Md5()); } public get_md5(str:string):string { return this.md5(str); } split(target: string | any[], step: number, markString: boolean = typeof target === "string") { if (typeof target === "string") target = target.split(""); let result: any[] = target.ma...

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

2. TimeLine.addLabel(label:String, offset:Number):TimeLine 亲测! 方法中第二个参数offset无效 [ 95%]

TimeLine.addLabel(label:String, offset:Number):TimeLine 亲测! 方法中第二个参数offset无效 如题,TimeLinde的addLabel方法的第二个参数offset没有实际效果! 1.addLabel方法中的第二个参数 offset 是什么意思 2.to方法中的 offset 又是什么意思,二者...

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

3. 为什么字符串不能连接? [ 92%]

为什么字符串不能连接? private getRandomColor():String { let arr:Array<String>=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f"]; let str:String="#"; for(let i:number=0;i<6;i++){ let index:number=arr.length*Math.random(); str+=arr[index];//在IDE里面这句报...

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

4. 类似古文显示方式脚本,文字垂直显示,可以控制显示速度出现打字效果等 [ 91%]

...ient extends Laya.Script { /** @prop {name:text, tips:"显示文本", type:String, default:"hello world"}*/ public text: string = "hello world"; /** @prop {name:color, tips:"字符串类型示例", type:String, default:"#0000ff"}*/ public color: string = "#0000ff"; /** @prop {name:layoutType, tips:"...

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

5. socket大型项目回调 [ 87%]

...a{ export class Pomelo{ static DEBUG:boolean = true; static EVENT_IO_ERROR:string = "io-error"; static EVENT_CLOSE:string = "close"; static EVENT_KICK:string = "onKick"; static EVENT_HEART_BEAT_TIMEOUT:string = 'heartbeat timeout'; private JS_WS_CLIENT_TYPE:string = 'js-websocket'; private JS_WS_CLI...

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

6. 有没有办法获取音乐播放状态? [ 85%]

...否应该在页面加载后进行加载*/         public var preload:String;         /**设置或返回音频/视频是否暂停*/         public var paused:Boolean;         /**返回音频/视频的播放是否已结束*/         public var ended:Boolean;        ...

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

7. 对游戏中各种控件字体样式使用“白鹭style”样式表 [ 84%]

...没留下…… **/ interface ITextFormat { /** * 背景色 */ bgColor?: string; /** * 是否加粗 */ bold?: number; /** * 文本框背景色 */ borderColor?: string; /** * 文本颜色 */ color?: string; /** * 字体 */ font?: string; /** * 字体大小 */ fontSize?: number; /** * 是否为斜体 ...

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

8. LayaAir 2.0 TS版编译出错GameConfig跟创建项目时生成的内容不一致了 [ 84%]

...nfig{ static width:number=640; static height:number=1136; static scaleMode:string="fixedwidth"; static screenMode:string="none"; static startScene:string="test/TestScene.scene"; static sceneRoot:string=""; static debug:boolean=false; static stat:boolean=false; static physicsDebug:boolean=false; stat...

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

9. Clip组件Bug:Play方法无法结束循环 [ 79%]

...*/     private toFrameIndex = -1;     /**      * @param {string} path 原图位置(Sprite图)      * @param {number} cols 列数      * @param {number} rows 行数      * @param {number} [interval] 间隔时间,选填      * @param {boolean}...

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

10. 版本号:2.0.2 beta, 在sound文件夹下音乐播放不了,放入到res文件夹下可播放 [ 79%]

...n.on(Event.CLICK, this, this.onPlayMusic); }  private createButton(label: string): Sprite { var w: number = 110; var h: number = 40;  var button: Sprite = new Sprite(); button.size(w, h); button.graphics.drawRect(0, 0, w, h, "#FF7F50"); button.graphics.fillText(label, w / 2, 8, "25px SimHei", "#FF...

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