├── README.md ├── copy_src.cmd └── src └── com └── easyegret ├── animate ├── AnimateData.ts ├── AnimateManager.ts └── AnimateTexture.ts ├── component ├── DebugWin.ts ├── DefaultGuideWin.ts ├── DefaultRenderer.ts ├── LoadingBaseUI.ts ├── LoadingViewUI.ts ├── LoadingWinUI.ts ├── MessageTips.ts ├── ReceiveGroup.ts ├── ScrollGroup.ts ├── Template.ts ├── View.ts ├── Win.ts └── effect │ ├── BaseEffect.ts │ ├── IEffect.ts │ └── RollerDown.ts ├── core ├── GlobalSetting.ts ├── HeartBeat.ts └── ObjectPool.ts ├── event ├── EventManager.ts ├── EventType.ts └── MyEvent.ts ├── framework ├── PopupManager.ts ├── ResManager.ts ├── ViewManager.ts └── msghandle │ ├── BaseHandle.ts │ ├── IHandle.ts │ └── MessageControler.ts ├── guide ├── GuideChapter.ts ├── GuideItem.ts └── GuideManager.ts ├── io ├── DefaultDecoder.ts ├── DefaultEncoder.ts ├── IDecoder.ts ├── IEncoder.ts └── MySocket.ts ├── packet ├── BaseEntity.ts ├── DefaultHeader.ts ├── DefaultPacketFactory.ts ├── IHeader.ts ├── IPacketFactory.ts ├── Packet.ts └── PacketFactory.ts ├── report ├── Report.ts └── bean │ ├── ReportLogin.ts │ └── ReportShop.ts ├── rpg ├── DirectionUtil.ts ├── RpgSetting.ts ├── animate │ ├── AnimateManager.ts │ ├── BaseAnimate.ts │ ├── DamageAnimate.ts │ ├── EffectAnimate.ts │ ├── HitAnimate.ts │ ├── IAnimate.ts │ ├── ParalleQueue.ts │ └── SequenceQueue.ts ├── astar │ ├── AStar.ts │ ├── BinaryHeap.ts │ ├── Grid.ts │ ├── Link.ts │ └── Node.ts ├── control │ ├── ActorCtrl.ts │ ├── NpcCtrl.ts │ └── PlayerCtrl.ts ├── data │ ├── ActorData.ts │ ├── GameData.ts │ └── IActorData.ts └── display │ ├── Actor.ts │ ├── Camera.ts │ ├── Character.ts │ ├── Map.ts │ ├── Npc.ts │ ├── Player.ts │ └── Scene.ts ├── ui ├── BaseGroup.ts ├── Button.ts ├── CheckBox.ts ├── Group.ts ├── HGroup.ts ├── HScrollBar.ts ├── HSlider.ts ├── Image.ts ├── Label.ts ├── LabelImage.ts ├── LayoutMode.ts ├── List.ts ├── MovieClip.ts ├── ScrollBar.ts ├── ScrollPane.ts ├── Slider.ts ├── Style.ts ├── TextInput.ts ├── TitleGroup.ts ├── VGroup.ts ├── VScrollBar.ts └── VSlider.ts └── utils ├── DaoUtil.ts ├── Debug.ts ├── HitTestUtil.ts ├── MD5.ts ├── MathUtil.ts ├── ObjectUtil.ts ├── ParabolaUtil.ts ├── Sound.ts ├── StringUtil.ts └── UUID.ts /README.md: -------------------------------------------------------------------------------- 1 | Easy Egret 2 | ========= 3 | 简单易用的egret游戏框架,让游戏制作飞起来! 4 | 5 | 1.HTML5游戏制作的框架 6 | -------------------- 7 | * 框架居于egret引擎 8 | 9 | 2.我们的目的: 10 | -------------------- 11 | * 提供一整套游戏的解决方案,包括:易用的UI,页面切换,窗口,数据,事件,协议的控制 12 | 13 | * 在UI层,我们会提供一个UI工具,方便生成UI代码 14 | 15 | * 在游戏协议层,我们提供一个协议规范和协议代码生成工具,方便生成协议代码 16 | 17 | 3.为什么UI又造轮子: 18 | -------------------- 19 | * 各种skin方式的UI我们基本不看好,貌似高级,但是对游戏制作来说,绝对是梦魇.高效率的UI才是王道. 20 | * 所以我们的这个轮子可以说简单暴力,但是效率应该最高. 21 | * 不要跟我说皮肤自适应的问题,在小游戏中可以,大点的游戏行不通.在游戏制作中,叫换皮,不会是简单的源素材x2,x3的!甚至规格,尺寸,样式,布局都会改变,因此游戏中换皮基本是全换!UI层得再来一次,未避免重复劳动,总结出来的经验就是把UI独立出来,避免带入逻辑,这样换皮的代价最小. 22 | * 打包的游戏大小也是要重点考虑的问题,因此有必要打造专属游戏的UI.所以我们又造了一遍轮子! 23 | 24 | 4.目录说明: 25 | -------------------- 26 | 27 | 28 | 5.技术问题,请移步我们的网站: 29 | -------------------- 30 | * http://www.easyegret.com 31 | 32 | 6.联系我们 33 | -------------------- 34 | * stonelu 35 | * EMAIL:stonelu@126.com 36 | * QQ:1296199532 37 | 38 | * leon 39 | * EMAIL:420766818@qq.com 40 | * QQ:420766818 -------------------------------------------------------------------------------- /copy_src.cmd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stonelu/easyegret/677ca96233562788cda2c9939b1842d630625e47/copy_src.cmd -------------------------------------------------------------------------------- /src/com/easyegret/animate/AnimateData.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,www.easyegret.com 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | /** 29 | * 动画数据 30 | */ 31 | export class AnimateData { 32 | public id:string = null;//数据id 33 | public frame:number = 0;//帧数 34 | public _json:any = null;//材质json定义 35 | 36 | public width:number = 0; 37 | public height:number = 0; 38 | public _spriteSheet:egret.SpriteSheet = null; 39 | public textures:Array = null;//通用动画材质 40 | public textureDict:any = null; 41 | private _type:string = AnimateData.TYPE_EFFECT; 42 | 43 | public static TYPE_ACTOR:string = "actor";//人物动画材质 44 | public static TYPE_EFFECT:string = "effect";//普通动画效果 45 | 46 | public constructor(name:string) { 47 | this.id = name; 48 | var jsonData:any = RES.getRes(name + "_animate_json"); 49 | if (jsonData != null) { 50 | this.textureDict = {}; 51 | this.id = jsonData.id; 52 | this.frame = jsonData.frame; 53 | this._type = jsonData.type; 54 | var animateTexture:AnimateTexture = null; 55 | this._spriteSheet = new egret.SpriteSheet(RES.getRes(name + "_animate_img")); 56 | if (jsonData.type == "actor") { 57 | var textureArr:Array = null; 58 | for (var key in jsonData.texture){ 59 | textureArr = []; 60 | this.textureDict[key] = textureArr; 61 | for(var i = 0; i < jsonData.texture[key].length; i++) { 62 | animateTexture = new easy.AnimateTexture(); 63 | animateTexture.x = jsonData.texture[key][i].ox; 64 | animateTexture.y = jsonData.texture[key][i].oy; 65 | animateTexture.width = jsonData.texture[key][i].w; 66 | animateTexture.height = jsonData.texture[key][i].h; 67 | animateTexture.offsetX = jsonData.texture[key][i].x; 68 | animateTexture.offsetY = jsonData.texture[key][i].y; 69 | animateTexture.id = jsonData.texture[key][i].id; 70 | if (animateTexture.width > this.width) this.width = animateTexture.width; 71 | if (animateTexture.height > this.height) this.height = animateTexture.height; 72 | if (jsonData.texture[key][i].f) { 73 | animateTexture.frame = jsonData.texture[key][i].f; 74 | }else { 75 | animateTexture.frame = this.frame; 76 | } 77 | animateTexture.texutre = this._spriteSheet.createTexture(key + "_" + i, animateTexture.offsetX, animateTexture.offsetY, animateTexture.width, animateTexture.height); 78 | textureArr.push(animateTexture); 79 | } 80 | } 81 | } else { 82 | this.textures = []; 83 | for(var i = 0; i < jsonData.texture.length; i++) { 84 | animateTexture = new easy.AnimateTexture(); 85 | animateTexture.x = jsonData.texture[i].ox; 86 | animateTexture.y = jsonData.texture[i].oy; 87 | animateTexture.width = jsonData.texture[i].w; 88 | animateTexture.height = jsonData.texture[i].h; 89 | animateTexture.offsetX = jsonData.texture[i].x; 90 | animateTexture.offsetY = jsonData.texture[i].y; 91 | animateTexture.id = jsonData.texture[i].id; 92 | if (animateTexture.width > this.width) this.width = animateTexture.width; 93 | if (animateTexture.height > this.height) this.height = animateTexture.height; 94 | if (jsonData.texture[i].f) { 95 | animateTexture.frame = jsonData.texture[i].f; 96 | }else { 97 | animateTexture.frame = this.frame; 98 | } 99 | animateTexture.texutre = this._spriteSheet.createTexture(this.id + "_" + i, animateTexture.offsetX, animateTexture.offsetY, animateTexture.width, animateTexture.height); 100 | this.textures.push(animateTexture); 101 | } 102 | } 103 | } 104 | } 105 | 106 | /** 107 | * 获取通用动画材质数据 108 | */ 109 | public getTexture(index:number):AnimateTexture { 110 | if (index >= 0 && index < this.textures.length){ 111 | return this.textures[index]; 112 | } 113 | return null; 114 | } 115 | 116 | /** 117 | * 获取人物动画材质 118 | * @param direction 119 | * @param index 120 | * @returns {null} 121 | */ 122 | public getTextureActor(direction:string, index:number):AnimateTexture { 123 | if (this.textureDict[direction] && index >= 0) { 124 | if (index < this.textureDict[direction].length){ 125 | return this.textureDict[direction][index]; 126 | } 127 | } 128 | return null; 129 | } 130 | } 131 | } -------------------------------------------------------------------------------- /src/com/easyegret/animate/AnimateTexture.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,www.easyegret.com 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | /** 29 | * 动画元数据 30 | */ 31 | export class AnimateTexture { 32 | public id:string = null;//名称 33 | public frame:number = 0;//播放时长 34 | public width:number = 0;//材质宽 35 | public height:number = 0;//材质高 36 | public x:number = 0;//x值 37 | public y:number = 0;//y值 38 | public offsetX:number = 0;//offset x值 39 | public offsetY:number = 0;//offset y值 40 | public texutre:egret.Texture = null;//材质 41 | public constructor() { 42 | } 43 | } 44 | } -------------------------------------------------------------------------------- /src/com/easyegret/component/DebugWin.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,www.easyegret.com 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | /** 29 | * Debug信息显示窗口 30 | */ 31 | export class DebugWin extends Win { 32 | //操作按钮容器 33 | private _bottomContainer:Group = null; 34 | //顶部信息容器 35 | private _topContainer:Group = null; 36 | private _labelTitle:Label = null; 37 | 38 | //内容显示 39 | private _textInfo:egret.TextField = null; 40 | //关闭按钮 41 | private _btnClose:Button = null; 42 | //刷新按钮 43 | private _btnRefresh:Button = null; 44 | /** 45 | * view成对应的ui展现 46 | * @type {null} 47 | * @private 48 | */ 49 | 50 | public constructor() { 51 | super(); 52 | } 53 | /** 54 | * 初始化ui数据 55 | * 这个方法在对象new的时候就调用,因为有些ui必须在加入stage之前就准备好 56 | */ 57 | public createChildren():void{ 58 | super.createChildren(); 59 | //窗口宽高 60 | this.width = 300; 61 | this.height = 400; 62 | //顶部信息设置 63 | this._topContainer = new Group(); 64 | this._topContainer.height = 15; 65 | this._topContainer.width = this.width; 66 | this._topContainer.y = 0; 67 | this.addChild(this._topContainer); 68 | 69 | this._labelTitle = new Label(); 70 | this._labelTitle.text = "Debug窗口"; 71 | this._topContainer.addChild(this._labelTitle); 72 | 73 | //底部按钮设置 74 | //按钮容器 75 | this._bottomContainer = new Group(); 76 | this._bottomContainer.height = 30; 77 | this._bottomContainer.width = this.width; 78 | this._bottomContainer.y = this.height - this._bottomContainer.height; 79 | this.addChild(this._bottomContainer); 80 | //刷新按钮 81 | this._btnRefresh = new Button(); 82 | this._btnRefresh.label = "刷新"; 83 | this._btnRefresh.setSize(50, 25); 84 | this._btnRefresh.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchRegresh, this); 85 | this._bottomContainer.addChild(this._btnRefresh); 86 | 87 | //关闭按钮 88 | this._btnClose = new Button(); 89 | this._btnClose.x = this._btnRefresh.width + 2; 90 | this._btnClose.label = "关闭"; 91 | this._btnClose.setSize(50, 25); 92 | this._bottomContainer.addChild(this._btnClose); 93 | this._btnClose.addEventListener(egret.TouchEvent.TOUCH_TAP, this.onTouchClose, this); 94 | 95 | //内容显示设置 96 | this._textInfo = new egret.TextField(); 97 | this._textInfo.multiline = true; 98 | this._textInfo.textColor = 0x000000; 99 | this._textInfo.size = 12; 100 | this._textInfo.lineSpacing = 6; 101 | this._textInfo.x = 1; 102 | this._textInfo.y = this._topContainer.height + 1; 103 | this._textInfo.width = this.width; 104 | this._textInfo.height = this.height - this._topContainer.height - this._bottomContainer.height - 2; 105 | this.addChild(this._textInfo); 106 | 107 | } 108 | 109 | /** 110 | * 刷新内容事件 111 | * @param event 112 | */ 113 | private onTouchRegresh(event:egret.TouchEvent):void { 114 | this._textInfo.text = Debug.log; 115 | } 116 | /** 117 | * 关闭窗口事件 118 | * @param event 119 | */ 120 | private onTouchClose(event:egret.TouchEvent):void { 121 | DebugWin.hidden(); 122 | } 123 | 124 | 125 | //单例调用 126 | private static _instance:DebugWin = null; 127 | 128 | /** 129 | * 显示 130 | */ 131 | public static show():void { 132 | if (DebugWin._instance == null) { 133 | DebugWin._instance = new DebugWin(); 134 | } 135 | GlobalSetting.STAGE.addChild(DebugWin._instance); 136 | } 137 | 138 | /** 139 | * 隐藏 140 | */ 141 | public static hidden():void { 142 | if (DebugWin._instance && DebugWin._instance.parent) { 143 | DebugWin._instance.parent.removeChild(this._instance); 144 | } 145 | } 146 | } 147 | } -------------------------------------------------------------------------------- /src/com/easyegret/component/DefaultGuideWin.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stonelu/easyegret/677ca96233562788cda2c9939b1842d630625e47/src/com/easyegret/component/DefaultGuideWin.ts -------------------------------------------------------------------------------- /src/com/easyegret/component/DefaultRenderer.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/stonelu/easyegret/677ca96233562788cda2c9939b1842d630625e47/src/com/easyegret/component/DefaultRenderer.ts -------------------------------------------------------------------------------- /src/com/easyegret/component/LoadingViewUI.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,Egret-Labs.org 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | export class LoadingViewUI extends LoadingBaseUI { 29 | public constructor() { 30 | super(); 31 | } 32 | /** 33 | * 根据waitview的ui数据,进行下载控制 34 | */ 35 | public enter():void { 36 | this._currentDisplayObject = ViewManager._waitChangeView; 37 | super.enter(); 38 | } 39 | /** 40 | * 完成下载,回调加载view 41 | */ 42 | public outer():void { 43 | super.outer(); 44 | //console.log("@@LoadingViewUI outer") 45 | ViewManager.waitViewDoEnter(); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /src/com/easyegret/component/LoadingWinUI.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,Egret-Labs.org 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | export class LoadingWinUI extends LoadingBaseUI { 29 | 30 | public constructor() { 31 | super(); 32 | } 33 | /** 34 | * 根据waitview的ui数据,进行下载控制 35 | */ 36 | public enter():void { 37 | this._currentDisplayObject = PopupManager.waitShowWin; 38 | super.enter(); 39 | } 40 | /** 41 | * 完成下载,回调加载win 42 | */ 43 | public outer():void { 44 | super.outer(); 45 | PopupManager.waitWinDoEnter(); 46 | //console.log("@@LoadingWinUI outer") 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /src/com/easyegret/component/MessageTips.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2014,www.easyegret.com 3 | * All rights reserved. 4 | * Redistribution and use in source and binary forms, with or without 5 | * modification, are permitted provided that the following conditions are met: 6 | * 7 | * * Redistributions of source code must retain the above copyright 8 | * notice, this list of conditions and the following disclaimer. 9 | * * Redistributions in binary form must reproduce the above copyright 10 | * notice, this list of conditions and the following disclaimer in the 11 | * documentation and/or other materials provided with the distribution. 12 | * * Neither the name of the Egret-Labs.org nor the 13 | * names of its contributors may be used to endorse or promote products 14 | * derived from this software without specific prior written permission. 15 | * 16 | * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY 17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 19 | * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY 20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 | */ 27 | module easy { 28 | /** 29 | * 一个文字提示显示 30 | */ 31 | export class MessageTips extends BaseGroup { 32 | private static _instance:MessageTips = null;// 33 | private _dulation:number = 15;//停留时间 34 | private _mssageArr:Array = [];//消息内容 35 | 36 | private _labelArr:Array