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

大约有 357 项符合查询结果, 库内数据总量为 31,722 项。 (搜索耗时: 0.0056 秒)

141. DOM元素-表单输入 [ 74%]

...new DOM_Form();class DOM_Form{ private form:Laya.Sprite; private rowHeight:number = 30; private rowSpacing:number = 10; constructor() { Laya.init(600,400); Laya.stage.alignH = Laya.Stage.ALIGN_CENTER; Laya.stage.alignV = Laya.Stage.ALIGN_MIDDLE; Laya.stage.scaleMode = Laya.Stage.SCALE_SHOWALL; Laya....

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

142. 输入设备-摇一摇 [ 74%]

...; import Event = Laya.Event; export class InputDevice_Shake { private picW:number = 484; private picH:number = 484; private console:Text; private shakeCount:number = 0; constructor() { Laya.init(this.picW, Browser.height * this.picW / Browser.width); Laya.stage.scaleMode = Stage.SCALE_SHOWALL; this....

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

143. 动画-SWF动画 [ 74%]

...F { private SWFPath: string = "../../res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

来源: Laya_示例 发布时间: 20260303

144. 加载-错误处理和进度 [ 74%]

...og("加载结束"); } // 加载进度侦听器 private onLoading(progress: number): void { console.log("加载进度: " + progress); } private onError(err: String): void { console.log("加载失败: " + err); } } } new laya.Loader_ProgressAndErrorHandle();package { import laya.events.Event; import l...

来源: Laya_示例 发布时间: 20260303

145. 动画-SWF动画 [ 74%]

...ion_SWF { private SWFPath: string = "res/swf/dragon.swf"; private MCWidth: number = 318; private MCHeight: number = 406; constructor() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); Laya.stage.alignV = Stage.ALIGN_MIDDLE; Laya.stage.alignH = ...

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

146. 使用createFrames创建的图集动画。如何单独修改这个缓存动画播放速度 [ 74%]

...了!/** * 角色创建 */ public function init(interval,type:String,hp:Number,speed:Number,hitRadius:Number,camp:Number,heroType:Number = 0):void { //初始化属性 this.type = type; this.hp = hp; this.speed = speed; this.hitRadius = hitRadius; this.camp = camp; this.heroType = heroType; if(!Role...

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

147. LayaAir能做RPG吗?不要问我能不能,因为我已经在做 - 杀意来袭 [ 73%]

...全覆盖下,不能只处理get或set,如: class A {  protected _id:number = 1;    public get id():number { return this._id }  public set id(value:number){     this._id = vaule;  } } class B extends A {   public set id(value:number){     this._id = value + 1;   } } class C extends A {...

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

148. 超出文本区域的处理&滚动文本(ActionScript-LayaAir基础篇(AS3)-文本) [ 73%]

....WebGL; public class Text_Scroll { private var txt:Text; private var prevX:Number = 0; private var prevY:Number = 0; public function Text_Scroll() { // 不支持WebGL时自动切换至Canvas Laya.init(Browser.clientWidth, Browser.clientHeight, WebGL); createText(); } private function createText():vo...

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

149. 加载-加载序列 [ 73%]

... Handler = Laya.Handler; export class Loader_Sequence { private numLoaded: number = 0; private resAmount: number = 3; constructor() { Laya.init(500, 400); // 按序列加载 monkey2.png - monkey1.png - monkey0.png // 不开启缓存 // 关闭并发加载 Laya.loader.maxLoader = 1; Laya.loader.load("...

来源: Laya_示例 发布时间: 20260303

150. Laya.timer.loop() 报错 Cannot read property 'loop' of null [ 73%]

...lic _list: List; //创建一个 List 类的实例对象 list 。 private n:number = 0; private x0:number = 0; private y0:number = 0; constructor(){super();} onEnable():void{ this.x = this.x0; this.y = this.y0; Laya.timer.loop(20, this, this.frameWork); // 每 20 ms 执行一次 } private frameWork()...

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