var __reflect = (this && this.__reflect) || function (p, c, t) {
    p.__class__ = c, t ? t.push(c) : t = [c], p.__types__ = p.__types__ ? t.concat(p.__types__) : t;
};
var __extends = this && this.__extends || function __extends(t, e) { 
 function r() { 
 this.constructor = t;
}
for (var i in e) e.hasOwnProperty(i) && (t[i] = e[i]);
r.prototype = e.prototype, t.prototype = new r();
};
/**
 * Copyright (c) 2014,www.easygame.org
 * All rights reserved.
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 *     * Redistributions of source code must retain the above copyright
 *       notice, this list of conditions and the following disclaimer.
 *     * Redistributions in binary form must reproduce the above copyright
 *       notice, this list of conditions and the following disclaimer in the
 *       documentation and/or other materials provided with the distribution.
 *     * Neither the name of the easygame.org nor the
 *       names of its contributors may be used to endorse or promote products
 *       derived from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY EASYEGRET.COM AND CONTRIBUTORS "AS IS" AND ANY
 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
 * DISCLAIMED. IN NO EVENT SHALL EGRET-LABS.ORG AND CONTRIBUTORS BE LIABLE FOR ANY
 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
var modules;
(function (modules) {
    /**
     * <p></p>
     * @date  :2020-03-27 19:13:33
     * @EasyGame.org Tools
     */
    var index6 = (function (_super) {
        __extends(index6, _super);
        function index6() {
            var _this = _super.call(this, true) || this;
            _this.resourceRoot = "";
            _this.resSpriteSheet = "index6"; //合并材质资源名称
            _this.resTexture = ["6"]; //单材质资源名称
            _this.resGroup = ["courseware_index6"]; //配置文件的Group
            _this.resFiles = ["courseware/index6_loader_200327191333.json"]; //需要下载的资源group
            _this.spriteSheet = null; //ui对应的材质集,已经分割好,方便外部读取方便
            _this.group = null;
            _this.imgas = null;
            _this.groupAll = null;
            _this.imgBg = null;
            _this.img1 = null;
            _this.img2 = null;
            _this.img3 = null;
            _this.imgWord1 = null;
            _this.imgMove1 = null;
            _this.imgMove2 = null;
            _this.imgMove3 = null;
            _this.imgMove4 = null;
            _this.imgMove5 = null;
            _this.imgMove6 = null;
            _this.imgShow1 = null;
            _this.imgShow2 = null;
            _this.imgShow3 = null;
            _this.imgShow4 = null;
            _this.imgShow5 = null;
            _this.imgShow6 = null;
            _this.imgShow7 = null;
            _this.btnAgain = null;
            _this.btnPage = null;
            _this.temp = null;
            return _this;
        }
        /**
         * 初始化主场景的组件,加入场景时,主动调用一次
         * 子类覆写该方法,添加UI逻辑
         */
        index6.prototype.createChildren = function () {
            _super.prototype.createChildren.call(this);
            this.showBg = false;
            this.border = false;
            this.width = 640;
            this.height = 960;
            //group 
            this.group = new easy.Group(true);
            this.group.name = "group";
            this.addChild(this.group);
            this.group.bgColor = 0xffffff;
            this.group.border = false;
            this.group.width = 640;
            this.group.height = 960;
            //imgas 
            this.imgas = new easy.Image(true);
            this.imgas.name = "imgas";
            this.addChild(this.imgas);
            this.imgas.x = -1.5;
            this.imgas.width = 643;
            this.imgas.height = 927;
            this.imgas.topEnabled = true;
            this.imgas.visible = false;
            //groupAll 
            this.groupAll = new easy.Group(true);
            this.groupAll.name = "groupAll";
            this.addChild(this.groupAll);
            this.groupAll.showBg = false;
            this.groupAll.border = false;
            this.groupAll.width = 640;
            this.groupAll.height = 960;
            this.groupAll.horizontalEnabled = true;
            this.groupAll.verticalEnabled = true;
            //imgBg 
            this.imgBg = new easy.Image(true);
            this.imgBg.name = "imgBg";
            this.groupAll.addChild(this.imgBg);
            this.imgBg.x = -230;
            this.imgBg.y = -114;
            this.imgBg.width = 1100;
            this.imgBg.height = 1188;
            //img1 
            this.img1 = new easy.Image(true);
            this.img1.name = "img1";
            this.groupAll.addChild(this.img1);
            this.img1.width = 154;
            this.img1.height = 21;
            //img2 
            this.img2 = new easy.Image(true);
            this.img2.name = "img2";
            this.groupAll.addChild(this.img2);
            this.img2.x = 153;
            this.img2.width = 487;
            this.img2.height = 21;
            //img3 
            this.img3 = new easy.Image(true);
            this.img3.name = "img3";
            this.groupAll.addChild(this.img3);
            this.img3.x = 10;
            this.img3.y = 60;
            this.img3.width = 33;
            this.img3.height = 20;
            //imgWord1 
            this.imgWord1 = new easy.Image(true);
            this.imgWord1.name = "imgWord1";
            this.groupAll.addChild(this.imgWord1);
            this.imgWord1.x = 139;
            this.imgWord1.y = 56;
            this.imgWord1.width = 413;
            this.imgWord1.height = 50;
            //imgMove1 
            this.imgMove1 = new easy.Image(true);
            this.imgMove1.name = "imgMove1";
            this.groupAll.addChild(this.imgMove1);
            this.imgMove1.x = 49;
            this.imgMove1.y = 230;
            this.imgMove1.width = 208;
            this.imgMove1.height = 480;
            //imgMove2 
            this.imgMove2 = new easy.Image(true);
            this.imgMove2.name = "imgMove2";
            this.groupAll.addChild(this.imgMove2);
            this.imgMove2.x = 279;
            this.imgMove2.y = 230;
            this.imgMove2.width = 177;
            this.imgMove2.height = 262;
            //imgMove3 
            this.imgMove3 = new easy.Image(true);
            this.imgMove3.name = "imgMove3";
            this.groupAll.addChild(this.imgMove3);
            this.imgMove3.x = 469;
            this.imgMove3.y = 230;
            this.imgMove3.width = 171;
            this.imgMove3.height = 131;
            //imgMove4 
            this.imgMove4 = new easy.Image(true);
            this.imgMove4.name = "imgMove4";
            this.groupAll.addChild(this.imgMove4);
            this.imgMove4.x = 469;
            this.imgMove4.y = 370;
            this.imgMove4.width = 171;
            this.imgMove4.height = 124;
            //imgMove5 
            this.imgMove5 = new easy.Image(true);
            this.imgMove5.name = "imgMove5";
            this.groupAll.addChild(this.imgMove5);
            this.imgMove5.x = 279;
            this.imgMove5.y = 520;
            this.imgMove5.width = 177;
            this.imgMove5.height = 193;
            //imgMove6 
            this.imgMove6 = new easy.Image(true);
            this.imgMove6.name = "imgMove6";
            this.groupAll.addChild(this.imgMove6);
            this.imgMove6.x = 469;
            this.imgMove6.y = 520;
            this.imgMove6.width = 171;
            this.imgMove6.height = 193;
            //imgShow1 
            this.imgShow1 = new easy.Image(true);
            this.imgShow1.name = "imgShow1";
            this.groupAll.addChild(this.imgShow1);
            this.imgShow1.x = 94;
            this.imgShow1.y = 145;
            this.imgShow1.width = 84;
            this.imgShow1.height = 27;
            //imgShow2 
            this.imgShow2 = new easy.Image(true);
            this.imgShow2.name = "imgShow2";
            this.groupAll.addChild(this.imgShow2);
            this.imgShow2.x = 330;
            this.imgShow2.y = 145;
            this.imgShow2.width = 282;
            this.imgShow2.height = 61;
            //imgShow3 
            this.imgShow3 = new easy.Image(true);
            this.imgShow3.name = "imgShow3";
            this.groupAll.addChild(this.imgShow3);
            this.imgShow3.x = 226;
            this.imgShow3.y = 298;
            this.imgShow3.width = 102;
            this.imgShow3.height = 97;
            //imgShow4 
            this.imgShow4 = new easy.Image(true);
            this.imgShow4.name = "imgShow4";
            this.groupAll.addChild(this.imgShow4);
            this.imgShow4.x = 225;
            this.imgShow4.y = 341;
            this.imgShow4.width = 97;
            this.imgShow4.height = 49;
            //imgShow5 
            this.imgShow5 = new easy.Image(true);
            this.imgShow5.name = "imgShow5";
            this.groupAll.addChild(this.imgShow5);
            this.imgShow5.x = 225;
            this.imgShow5.y = 391;
            this.imgShow5.width = 97;
            this.imgShow5.height = 137;
            //imgShow6 
            this.imgShow6 = new easy.Image(true);
            this.imgShow6.name = "imgShow6";
            this.groupAll.addChild(this.imgShow6);
            this.imgShow6.x = 52;
            this.imgShow6.y = 721;
            this.imgShow6.width = 590;
            this.imgShow6.height = 123;
            //imgShow7 
            this.imgShow7 = new easy.Image(true);
            this.imgShow7.name = "imgShow7";
            this.groupAll.addChild(this.imgShow7);
            this.imgShow7.x = 83;
            this.imgShow7.y = 728;
            this.imgShow7.width = 508;
            this.imgShow7.height = 111;
            //btnAgain 
            this.btnAgain = new easy.Button(true);
            this.btnAgain.name = "btnAgain";
            this.groupAll.addChild(this.btnAgain);
            this.btnAgain.width = 133;
            this.btnAgain.height = 47;
            this.btnAgain.x = 467;
            this.btnAgain.y = 883;
            //btnPage 
            this.btnPage = new easy.Button(true);
            this.btnPage.name = "btnPage";
            this.groupAll.addChild(this.btnPage);
            this.btnPage.width = 133;
            this.btnPage.height = 47;
            this.btnPage.x = 27;
            this.btnPage.y = 883;
            //temp 
            this.temp = new modules.tempTemplate();
            this.temp.name = "temp";
            this.addChild(this.temp);
            if (this.temp.ui["resFiles"])
                this.resFiles = this.resFiles.concat(this.temp.ui.resFiles);
            if (this.temp.ui["resGroup"])
                this.resGroup = this.resGroup.concat(this.temp.ui.resGroup);
            this.temp.x = 540;
            this.temp.rightEnabled = true;
            this.temp.ui.rightEnabled = true;
        };
        /**
         * 获取初始化逻辑,加入场景时,主动调用一次
         * 子类覆写该方法,添加业务逻辑
         */
        index6.prototype.initData = function () {
            _super.prototype.initData.call(this);
        };
        /**
         * 进入的逻辑
         * 可以再次根据外部数据情况做一些逻辑处理
         */
        index6.prototype.enter = function () {
        };
        /**
         * 退出的逻辑
         * 做一些数据的销毁或者初始化,保证下次进入的时候,不会残留
         */
        index6.prototype.outer = function () {
        };
        /**
         * 刷新UI皮肤显示
         */
        index6.prototype.validateNow = function () {
            this.drawDelay = false;
            var jsonData = RES.getRes("index6_json");
            if (jsonData != null) {
                this.spriteSheet = new egret.SpriteSheet(RES.getRes("index6_img"));
                for (var key in jsonData.texture) {
                    this.spriteSheet.createTexture(key, jsonData.texture[key].x, jsonData.texture[key].y, jsonData.texture[key].w, jsonData.texture[key].h);
                }
            }
            this.group.drawDelay = false;
            this.imgas.texture = RES.getRes("6");
            this.imgas.drawDelay = false;
            this.groupAll.drawDelay = false;
            if (this.spriteSheet)
                this.imgBg.texture = this.spriteSheet.getTexture("page08-03");
            this.imgBg.drawDelay = false;
            if (this.spriteSheet)
                this.img1.texture = this.spriteSheet.getTexture("page03-01");
            this.img1.drawDelay = false;
            if (this.spriteSheet)
                this.img2.texture = this.spriteSheet.getTexture("page03-02");
            this.img2.drawDelay = false;
            if (this.spriteSheet)
                this.img3.texture = this.spriteSheet.getTexture("page3-01");
            this.img3.drawDelay = false;
            if (this.spriteSheet)
                this.imgWord1.texture = this.spriteSheet.getTexture("page6-01");
            this.imgWord1.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove1.texture = this.spriteSheet.getTexture("page6-04");
            this.imgMove1.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove2.texture = this.spriteSheet.getTexture("page6-05");
            this.imgMove2.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove3.texture = this.spriteSheet.getTexture("page6-06");
            this.imgMove3.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove4.texture = this.spriteSheet.getTexture("page6-07");
            this.imgMove4.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove5.texture = this.spriteSheet.getTexture("page6-08");
            this.imgMove5.drawDelay = false;
            if (this.spriteSheet)
                this.imgMove6.texture = this.spriteSheet.getTexture("page6-09");
            this.imgMove6.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow1.texture = this.spriteSheet.getTexture("page6-02");
            this.imgShow1.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow2.texture = this.spriteSheet.getTexture("page6-03");
            this.imgShow2.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow3.texture = this.spriteSheet.getTexture("page6-12");
            this.imgShow3.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow4.texture = this.spriteSheet.getTexture("page6-13");
            this.imgShow4.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow5.texture = this.spriteSheet.getTexture("page6-14");
            this.imgShow5.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow6.texture = this.spriteSheet.getTexture("page6-10");
            this.imgShow6.drawDelay = false;
            if (this.spriteSheet)
                this.imgShow7.texture = this.spriteSheet.getTexture("page6-11");
            this.imgShow7.drawDelay = false;
            if (this.spriteSheet)
                this.btnAgain.texture = this.spriteSheet.getTexture("page02-12");
            this.btnAgain.drawDelay = false;
            if (this.spriteSheet)
                this.btnPage.texture = this.spriteSheet.getTexture("page02-11");
            this.btnPage.drawDelay = false;
            //模板temp
            this.temp.validateNow();
        };
        return index6;
    }(easy.Group));
    modules.index6 = index6;
    __reflect(index6.prototype, "modules.index6");
})(modules || (modules = {}));
