Exemplo n.º 1
0
 public void update()
 {
     for (int i = 0, len = this._currCd.Count; i < len; i++)
     {
         MediatorSystem.timeStart("birth" + i);
         this._currCd[i] -= ConfigConstant.MAP_ACT_TIME_S * this._beans[i].Count;
         if (this._currCd[i] <= 0)
         {
             this._currCd[i] = this.getBeanTotalTime(i + 1);
             if (this._beans[i].Count > 0)
             {
                 LoopBeanEntity bean = this._beans[i][0];
                 this._beans[i].RemoveAt(0);
                 bean.revive();
                 if (!bean.alived)
                 {
                     this._removeCount[i]++;
                     if (3 == this._removeCount[i])
                     {
                         Utils.clearList(this._beans[i]);
                         this._removeCount[i] = 0;
                     }
                 }
                 else
                 {
                     this._removeCount[i] = 0;
                 }
             }
         }
         MediatorSystem.getRunTime("birth" + i, this._beans[i].Count);
     }
 }
Exemplo n.º 2
0
 public override void update()
 {
     base.update();
     MediatorSystem.timeStart("checkBea");
     this.checkBean();//检查吃豆子
     MediatorSystem.getRunTime("checkBea");
     this.fightResult.update();
 }
Exemplo n.º 3
0
 void Awake()
 {
     instance = this;
     this.InvokeRepeating("clearMax", 1f, 5f);
     this.btn.onClick.AddListener(() => {
         this.text.gameObject.SetActive(!this.text.gameObject.activeSelf);
         LogMessage.instance.gameObject.SetActive(this.text.gameObject.activeSelf);
     });
 }
Exemplo n.º 4
0
 internal void testUseCard()
 {
     MediatorSystem.timeStart("useCard");
     for (int i = 0, len = FightMain.instance.selection.players.Count; i < len; i++)
     {
         PlayerEntity player = FightMain.instance.selection.players[i];
         player.cardGroup.expendCard(1);
         //NetAdapter.sendUseCard(player.uid, 1);
     }
     MediatorSystem.getRunTime("useCard");
 }
Exemplo n.º 5
0
 public override void update()
 {
     base.update();
     MediatorSystem.timeStart("barrierSingle");
     this.checkPerson();
     if (this._bounceSelfRate > 0)
     {
         this.checkBullet();
         this.bounceBack();
         this.applyPosition();
     }
     MediatorSystem.getRunTime("barrierSingle");
 }
Exemplo n.º 6
0
 public override void update()
 {
     MediatorSystem.timeStart("SinglePlayerUpdate");
     base.update();
     MediatorSystem.getRunTime("SinglePlayerUpdate");
     MediatorSystem.timeStart("actionUpdate");
     this.actionManager.update();
     MediatorSystem.getRunTime("actionUpdate");
     for (int i = this._buffs.Count - 1; i >= 0; i--)
     {
         this._buffs[i].update();
     }
 }
Exemplo n.º 7
0
    public GameObject addEffect(string res, Vector2D position, float scale = 1)
    {
        GameObject go = ResFactory.getCacheEffect(res, this.clientRunTime);

        if (null == go)
        {
            MediatorSystem.log("effectLost", res);
            Debug.Log("没有资源" + res);
            return(go);
        }
        go.transform.SetParent(this.effectLayer, false);
        go.transform.localPosition = ViewUtils.logicToScene(position, this.clientRunTime.mapData.earthRadius, this.clientRunTime.mapData);

        Vector3 v = new Vector3(this.transform.position.x, go.transform.position.y, this.transform.position.z);

        go.transform.LookAt(v);
        if (1 != scale)
        {
            GameObjectScaler.Scale(go, scale);
        }
        return(go);
    }
Exemplo n.º 8
0
    private void onFrameHandler(MainEvent e)
    {
        if (TestValue.test1)
        {
            return;
        }
        MediatorSystem.timeStart("rank");
        List <PlayerEntity> playerList = FightMain.instance.selection.getSortPlayer(1);
        int count = Math.Min(playerList.Count, this._rankList.Count);

        for (int i = 0, len = this._rankList.Count; i < len; i++)
        {
            //最后一个显示自己 并且要求还得都显示的下!
            if (i >= count)
            {
                this._rankList[i].hide();
            }
            else
            {
                if (i == this._rankList.Count - 1)
                {
                    int index = playerList.IndexOf(this.player);
                    if (index >= i) //如果自己不在之前的排行榜里 就显示。
                    {
                        this._rankList[i].changeIndexText(index, this.player);
                    }
                    else
                    {
                        this._rankList[i].hide();
                    }
                }
                else
                {
                    this._rankList[i].changeIndexText(i, (ClientPlayerEntity)playerList[i]);
                }
            }
        }
        MediatorSystem.getRunTime("rank");
    }
Exemplo n.º 9
0
    private void createBullet()
    {
        object[] bullets = (object[])this._step["bullets"];
        //return;
        Dictionary <string, object> global = this._step.ContainsKey("global") ? (Dictionary <string, object>) this._step["global"] : null;

        MediatorSystem.timeStart("skillCreateBullet");
        BulletShallow shallow = null;

        if (this._step.ContainsKey("shallow"))
        {
            shallow         = new BulletShallow(this._map).init();
            shallow.shallow = Convert.ToDouble(this._step["shallow"]);
        }


        for (int i = 0, len = bullets.Length; i < len; i++)
        {
            //MediatorSystem.timeStart("clone");
            Dictionary <string, object> bulletData = (Dictionary <string, object>)bullets[i];
            //当前的字典 合并到子弹里。
            if (null != global)
            {
                Dictionary <string, object> temp = (Dictionary <string, object>)Utils.clone(global);
                Utils.union1(temp, bulletData);
                bulletData = temp;
            }
            //MediatorSystem.getRunTime("clone");

            BulletEntity bullet = this._player.map.createFightEntity(ConfigConstant.ENTITY_BULLET) as BulletEntity;
            bullet.lockTarget = this._lockTarget;
            bullet.owner      = this._player;
            bullet.shallow    = shallow;
            bullet.initConfig(bulletData);
        }

        MediatorSystem.getRunTime("skillCreateBullet", bullets.Length);
    }
Exemplo n.º 10
0
    protected virtual void onMapUpdate()
    {
        if (this.refereeController.isEnd)
        {
            return;
        }
        this.stepIndex++;
        MediatorSystem.timeStart("hitUpdate");
        //检查碰撞。。。
        for (int i = 0, len = this.persons.Count - 1; i < len; i++)
        {
            if (!this.persons[i].alived || this.persons[i].collisionShape.radius <= 0)
            {
                continue;
            }
            for (int j = i + 1, len2 = this.persons.Count; j < len2; j++)
            {
                if (!this.persons[j].alived || this.persons[j].collisionShape.radius <= 0)
                {
                    continue;
                }
                this.checkPlayerHit2(this.persons[i], this.persons[j]);
            }
        }
        MediatorSystem.getRunTime("hitUpdate");


        //ai计算 Biggo添加
        MediatorSystem.timeStart("aiUpdate");
        if (!TestValue.test4 && null != this.aiController)
        {
            this.aiController.update();
        }
        MediatorSystem.getRunTime("aiUpdate");

        //if(!TestValue.test2) {
        MediatorSystem.timeStart("playerUpdate");
        for (int i = this.persons.Count - 1; i >= 0; i--)
        {
            if (this.persons[i].alived)
            {
                this.persons[i].update();
            }
        }
        MediatorSystem.getRunTime("playerUpdate", this.persons.Count);
        //}


        //if(!TestValue.test3) {
        MediatorSystem.timeStart("beasUpdate");
        for (int i = this.beans.Count - 1; i >= 0; i--)
        {
            if (this.beans[i].alived)
            {
                this.beans[i].update();
            }
        }
        MediatorSystem.getRunTime("beasUpdate", this.beans.Count);
        //}
        //if(!TestValue.test4) {
        MediatorSystem.timeStart("othersUpdate");
        for (int i = this.others.Count - 1; i >= 0; i--)
        {
            this.others[i].update();
        }
        MediatorSystem.getRunTime("othersUpdate", this.others.Count);
        //}

        //if(!TestValue.test5) {
        MediatorSystem.timeStart("bulletsUpdate");
        //Debug.Log("update");
        for (int i = this.bullets.Count - 1; i >= 0; i--)
        {
            this.bullets[i].update();
        }
        MediatorSystem.getRunTime("bulletsUpdate", this.bullets.Count);
        //}

        //if(!TestValue.test6) {
        MediatorSystem.timeStart("applyPosition");
        for (int i = this.persons.Count - 1; i >= 0; i--)
        {
            if (this.persons[i].alived)
            {
                this.persons[i].applyPosition();
            }
        }
        MediatorSystem.getRunTime("applyPosition", this.persons.Count);

        //}

        this._delayCalls.update();
        //if(!TestValue.test7) {
        this.birthBeanController.update();
        this.refereeController.update();
        //}
    }
Exemplo n.º 11
0
    private void nextFrame()
    {
        if (this.stepIndex < this._steps.Count)
        {
            MediatorSystem.timeStart("serverAtc");
            this.dispatchEventWith(EventConstant.START);
            if (0 != this.fakeCount)
            {
                this.regainFake();                    //先回复到正常的状态。
            }
            object mapData = null;
            MediatorSystem.timeStart("parseData");
            if (null != this._steps[this.stepIndex])
            {
                List <Dictionary <string, object> > steps = this._steps[this.stepIndex];
                for (int i = 0, len = steps.Count; i < len; i++)
                {
                    this.parseData(steps[i]);
                }
                //上线的时候 不要保存数据 所以就扔了吧。 只保留数组长度。
                if (UnityEngine.Random.value > 100)
                {
                    this._steps[this.stepIndex] = null;
                }
                //mapData = steps[steps.Count - 1];
            }
            MediatorSystem.getRunTime("parseData");

            MediatorSystem.timeStart("onMapUpdate");
            this.onMapUpdate();
            MediatorSystem.getRunTime("onMapUpdate");

            if (FightMain.equal)
            {
                //if(( this.startStepIndex + this.stepIndex - 1) % 500 == 0 && NetAdapter.mapData.Count > 0) {
                //try {
                //object mapData = NetAdapter.mapData[0];
                //NetAdapter.mapData.RemoveAt(0);
                Dictionary <string, object> equalInfo = ViewUtils.equal(this.getData(), mapData, "");
                if (equalInfo.Count != 0)
                {
                    this.pause = true;
                    FightMain.instance.equalPanel.show(equalInfo);
                }
                //} catch(Exception e) {
                //    Debug.Log("equal出错了");
                //}
            }
            //}

            MediatorSystem.getRunTime("serverAtc");
        }
        else
        {
            if (0 == this.fakeCount)
            {
                this.saveFake();                    //记录当前虚假运行的。
            }
            this.fakeUpdate();
            MediatorSystem.log("fakeCount", this.stepIndex + "  " + this.fakeCount);
        }
    }
Exemplo n.º 12
0
    protected override void onUpdate()
    {
        if (this.pause)
        {
            return;
        }
        //MediatorSystem.log("stepCount", this._steps.Count - this.stepIndex);

        float viewActTime = (Time.time - this.startTime) * 1000;
        // 有新包的 并且之前有假的 那么要重新开始播。
        int startIndex = (this.isStack && this.fakeCount != 0 ? this.stepIndex : this.totalIndex);

        if (Time.deltaTime * 1000 > 40f || Time.deltaTime * 1000 < 25f)
        {
            //MediatorSystem.log("deltaTime", Time.deltaTime * 1000);
            intervaldd += Time.deltaTime * 1000 - 33f;
        }

        if (this.isStack)
        {
            this.isStack = false;
            float lastStepTime = (this._steps.Count) * ConfigConstant.MAP_ACT_TIME_S - 66f;
            if (viewActTime < lastStepTime)
            {
                this.startTime -= (lastStepTime - viewActTime) / 1000;
                viewActTime     = lastStepTime;
                Debug.Log("更新到服务器最新时间");
            }
        }
        viewActTime -= intervaldd;
        float cc = intervaldd * 0.05f;

        intervaldd -= cc;
        //MediatorSystem.log("intervaldd", intervaldd);

        float pos = viewActTime / ConfigConstant.MAP_ACT_TIME_S;

        //Debug.Log(( Time.time - this.startTime ) * 1000 + "  " + ( viewActTime / ConfigConstant.MAP_ACT_TIME_S ) + "   " + ( ( this._steps.Count ) * ConfigConstant.MAP_ACT_TIME_S - 66f ));
        MediatorSystem.timeStart("nextFrame");
        int len = (int)pos - startIndex;

        if (len > 0)
        {
            for (int i = 0; i < len; i++)
            {
                this.nextFrame();
            }
            if (this.fakeCount > 0)
            {
                this.netOffset += 2;
                if (this.netOffset > 5)
                {
                    this.startTime += 66f / 1000;
                    this.netOffset  = 0;
                    Debug.Log("延伸startTime时间");
                }
            }
            else
            {
                this.netOffset *= 0.95f;
            }
            this.dispatchEventWith(EventConstant.LOGIC_COMPLETE);
        }

        MediatorSystem.getRunTime("nextFrame", "num:" + ((int)pos - startIndex));
        this.totalIndex = (int)pos;

        if (!TestValue.test8)
        {
            MediatorSystem.timeStart("clientAtc");
            this.mapViewUpdate(pos - this.totalIndex);
            MediatorSystem.getRunTime("clientAtc");
        }

        if (this.isComplete)
        {
            this.finish();
        }
    }
Exemplo n.º 13
0
    private void Socket_Check(float time)
    {
        if (test)
        {
            if (package.Count >= 2)
            {
                test = false;
            }
        }
        if (test)
        {
            return;
        }
        index++;
//		Debug.LogError ("Socket_Check -->> :: " + package.Count);
        if (package.Count >= 1)
        {
            count    = package.Count;
            maxCount = Math.Max(count, maxCount);
//            long offset = ( System.DateTime.Now.Ticks - tick ) / 10000;

            //			if (0 != tick) {
            //				MediatorSystem.log("socketUpdate", offset);
            //
            //				if (offset >= 150) {
            //					MediatorSystem.log("socket大", offset);
            //				}
            //
            //				if (offset <= 50) {
            //					MediatorSystem.log("socket小", offset);
            //				}
            //
            //
            //			}

            tick = System.DateTime.Now.Ticks;
        }
//		Debug.LogError ("Socket_Check");
        MediatorSystem.log("count", package.Count + "   " + count + "    " + maxCount);
        while (package.Count != 0)
        {
            VoPackage vo = null;
            lock (package) {
                vo = package[0];
                package.Remove(vo);
            }
            if (vo.isClear)
            {
//                LogMessage.instance.text.text += "此vo已经被清除过了!";
                continue;
            }
            VoSocket v = new VoSocket();
//            MediatorSystem.timeStart("SockettoDatas");
            v.toDatas(vo.body);
//            MediatorSystem.getRunTime("SockettoDatas");
//			Debug.LogError ("re -->> :: " + v.method);
//			if (v.method == NetBase.SOCKET_LOGIN) {
//				Check_Ping ();
//			}
//            if(v.method != NetBase.SOCKET_PING && v.method != "sync")
//                Log.debug("SocketReceive[" + this.ip + "]:" + JsonUtility.ToJson(v));
            if (!vo.isClear)
            {
                if (call.ContainsKey(v.method))
                {
//					Debug.LogError (v.method);
                    SocketListener sl = call[v.method];
                    //try {
//                    MediatorSystem.timeStart("execSocketData");
                    sl.Excute(v);
//                    MediatorSystem.getRunTime("execSocketData");
                    //} catch(Exception e) {
                    //    Debug.Log(e.HelpLink);
                    //}
                }
            }
            else
            {
//                Log.debug("Socket Data Is Clear");
            }
            vo.Clear();
        }
        if (index % 500 == 0)
        {
            maxCount = 0;
            tick2    = 0;
        }
    }
Exemplo n.º 14
0
    void Update()
    {
        if (!this.isPlay)
        {
            return;
        }
        if (Input.GetKeyUp(KeyCode.Escape))
        {
            this.isPlay = false;
            this.cc     = 4;
        }
        else if (Input.GetKeyUp(KeyCode.F1))
        {
            this.isPlay = true;
            this.cc     = 5;
        }
        else if (Input.GetKeyUp(KeyCode.A))
        {
            isTest = !isTest;
        }
        else if (Input.GetKeyUp(KeyCode.S))
        {
            //NetSocket.test = true;
            NetAdapter.delayCount = Convert.ToInt32(TestValue.value) / ConfigConstant.MAP_ACT_TIME_S;
        }
        else if (Input.GetKeyUp(KeyCode.W))
        {
            FightMain.instance.selection.localPlayer.changeScore(-100000);
        }
        else if (Input.GetKeyUp(KeyCode.D))
        {
            FightMain.instance.selection.localPlayer.changeScore(100000);
        }
        else if (Input.GetKeyUp(KeyCode.C))
        {
            this.testUseCard();
        }
        else if (Input.GetKeyUp(KeyCode.Z))
        {
            this._selection.refereeController.radishController.addTeamPoint(0, 1);
        }
        else if (Input.GetKeyUp(KeyCode.X))
        {
            this._selection.refereeController.radishController.addTeamPoint(1, 1);
        }
        else if (Input.GetKeyUp(KeyCode.B))
        {
            Dictionary <string, object> bulletData = new Dictionary <string, object> {
                { "resId", "bulletNull" },
                { "speed", 1 },
                { "lifeTime", 30 },
                { "atk", 100000 },
                { "range", new object[] { ConfigConstant.SHIP_RADIUS } },
                { "posTarget", 1 },
                { "bangRes", "hitCollide" },
            };
            BulletEntity bullet = this._selection.createFightEntity(ConfigConstant.ENTITY_BULLET) as BulletEntity;
            bullet.lockTarget = this._selection.localPlayer;
            bullet.owner      = this._selection.localPlayer;
            bullet.initConfig(bulletData);
        }
        else if (Input.GetKeyUp(KeyCode.P))
        {
            this._selection.startTime += 33f / 1000;
        }


        MediatorSystem.timeStart("FightMain");
        //try {
        if (FightMain.isLocal && null != this.server)
        {
            this.server.update();
        }

        if (null != this._selection)
        {
            this._selection.update();
        }
        //} catch(Exception e) {
        //    LogMessage.instance.text.text += e.Message + "\n" + e.StackTrace;
        //    NetAdapter.sendQuitFight();
        //}


        //if(Input.GetKeyUp(KeyCode.Keypad1)) {
        //    this.selection = this.clients[0];
        //}else if(Input.GetKeyUp(KeyCode.Keypad2)) {
        //    this.selection = this.clients[1];
        //}else if(Input.GetKeyUp(KeyCode.Keypad3)) {
        //    this.selection = this.clients[2];
        //}
        MediatorSystem.getRunTime("FightMain");
    }
Exemplo n.º 15
0
    private void setTest()
    {
        this.getTestComponent <Button>("breakNet").onClick.AddListener(NetAdapter.sendQuitFight);
        this.getTestComponent <Button>("test").onClick.AddListener(FightMain.instance.changeTest);



        this.getTestComponent <Button>("goFrame").onClick.AddListener(() => {
            int totalIndex = int.Parse(this.stepInputText.text);
            FightMain.instance.autoRunClient.totalIndex = totalIndex;
            this.stepInputText.text            = FightMain.instance.autoRunClient.totalIndex.ToString();
            FightMain.instance.selection.pause = false;
        });
        this.getTestComponent <Button>("addPlayer").onClick.AddListener(() => {
            FightMain.instance.addUser(UnityEngine.Random.value.ToString(), FightMain.instance.selection.players.Count);
            //TimerManager.inst.flag = !TimerManager.inst.flag;
        });

        this.getTestComponent <Button>("pause").onClick.AddListener(() => {
            FightMain.instance.isPlay = !FightMain.instance.isPlay;
            FightMain.instance.cc     = 6;
        });

        this.getTestComponent <Button>("test1").onClick.AddListener(() => {
            //biggo修改
            FightMain.instance.selection.aiController.addUser();
        });
        this.getTestComponent <Button>("test2").onClick.AddListener(() => {
            //biggo修改
            FightMain.instance.selection.aiController.switchSelfAI();
        });
        this.getTestComponent <Button>("test3").onClick.AddListener(() => {
            //biggo修改
            string uid           = FightMain.instance.selection.uid;
            PlayerEntity cPlayer = FightMain.instance.selection.getPlayer(uid);
            PlayerEntity sPlayer = FightMain.instance.server.getPlayer(uid);
            Debug.Log("C:" + cPlayer.position + "  \nS:" + sPlayer.position);
        });
        this.getTestComponent <Button>("test4").onClick.AddListener(() => {
            //biggo修改
            //AIPlayer.SHOW_PATH = !AIPlayer.SHOW_PATH;
            TestValue.test4 = !TestValue.test4;

            for (int i = 0, len = FightMain.instance.selection.players.Count; i < len; i++)
            {
                FightMain.instance.selection.players[i].setJoystick(new Vector2D());
            }
        });

        List <int> cc = new List <int>();

        for (int i = 0, len = 100001; i < len; i++)
        {
            cc.Add(i);
        }
        this.getTestComponent <Button>("test5").onClick.AddListener(() => {
            //if(null != FightMain.instance.selection) FightMain.instance.selection.scene.beanLayer.gameObject.SetActive(!FightMain.instance.selection.scene.beanLayer.gameObject.activeSelf);
            MediatorSystem.log("testzzz", FightMain.instance.cc);
        });
        this.getTestComponent <Button>("test6").onClick.AddListener(() => {
            //if(null != FightMain.instance.selection) FightMain.instance.selection.scene.bulletLayer.gameObject.SetActive(!FightMain.instance.selection.scene.bulletLayer.gameObject.activeSelf);
            TestValue.test6 = !TestValue.test6;

            FightMain.instance.testUseCard();
        });
        this.getTestComponent <Button>("test7").onClick.AddListener(() => {
            //if(null != FightMain.instance.selection) FightMain.instance.selection.scene.bulletLayer.gameObject.SetActive(!FightMain.instance.selection.scene.bulletLayer.gameObject.activeSelf);
            TestValue.test7 = !TestValue.test7;
        });
        this.getTestComponent <Button>("test8").onClick.AddListener(() => {
            //if(null != FightMain.instance.selection) FightMain.instance.selection.scene.bulletLayer.gameObject.SetActive(!FightMain.instance.selection.scene.bulletLayer.gameObject.activeSelf);
            TestValue.test8 = !TestValue.test8;
        });

        this.getTestComponent <Slider> ("aiSlider").onValueChanged.AddListener((float value) => {
            //biggo添加
            AIConstant.IQ_DEFAULT           = value;
            FightMain.instance.server.AI_IQ = value;
            FightMain.instance.server.aiController.resetIQ(value);
        });
    }
Exemplo n.º 16
0
    void Update()
    {
        // ios gamecenter
                #if UNITY_IOS
        if (Social.localUser.authenticated)
        {
            if (!socialFirstGot && GameCenterManager.gameCenterIsSuccess)              //第一次打开游戏,记录第一个 gameCenterUID
            {
                socialUID        = Social.localUser.id;
                socialUNAME      = Social.localUser.userName;
                socialUIDchanged = false;
                socialFirstGot   = true;              //d
            }
            else
            {
                CheckChange();
            }
        }
        else
        {
            if (socialFirstGot)
            {
                CheckChange();
            }
        }
                #endif
//		if (gameModel != null && gameModel.time.Ticks != 0)
//		{
//			gameModel.time = gameModel.time.AddTicks ((long)(Time.deltaTime * 1000 * 10000));
//		}
        if (time <= 0)
        {
            if (Input.GetKey(KeyCode.F1))
            {
                LocalStore.Clear();
//				LocalStore.DelLocal(LocalStore.LOCAL_TYPE);
//				LocalStore.DelLocal(LocalStore.LOCAL_UID);
//				LocalStore.DelLocal(LocalStore.LOCAL_PWD);
                RELOGIN_GAME(null);
                roleModel.uids.Clear();
                time = 1;
            }
            else if (Input.GetKey(KeyCode.F4))
            {
                PlatForm.inst.HTTP = "http://192.168.1.118:8899/gateway/";
                RELOGIN_GAME(null);
                roleModel.uids.Clear();
                time = 1;
            }
            else if (Input.GetKey(KeyCode.F5))
            {
                PlatForm.inst.HTTP = "http://192.168.1.119:8899/gateway/";
                RELOGIN_GAME(null);
                roleModel.uids.Clear();
                time = 1;
            }
            else if (Input.GetKey(KeyCode.F2))
            {
                PhoneManager.inst.ScreenImage("screen_" + Tools.GetDateTimeString());
                time = 1;
            }
            else if (Input.GetKey(KeyCode.F3))
            {
                this.StartCoroutine(ScreenImage());
                time = 1;
            }
            else if (Input.GetKey(KeyCode.Home))
            {
                if (log == null)
                {
                    log = new ComLog();
                    GRoot.inst.AddChild(log.group);
                }
                else
                {
                    GRoot.inst.RemoveChild(log.group);
                    log = null;
                }
                time = 1;
            }
        }
        time -= Time.deltaTime;
        //		Log.debug ("time - " + time);
        MediatorSystem.timeStart("timerManager");
        TimerManager.inst.Update();
        MediatorSystem.getRunTime("timerManager");
    }