Esempio n. 1
0
 public override void UpdateLogic()
 {
     if (avatarFrame != null)
     {
         avatarFrame.UpdateAnimation();
     }
 }
Esempio n. 2
0
    public void Update()
    {
        /*
         * if (Camera.mainCamera != null)
         * {
         *  if (!Camera.mainCamera.audio.isPlaying && !BattlePressed)
         *  {
         *      Camera.mainCamera.audio.Play();
         *  }
         * }
         */

        if (Time.time - startTime > 1.5f)
        {
            if (!GameApp.GetInstance().GetGameState().AlreadyCountered)
            {
                GameApp.GetInstance().GetGameState().AddScore(1);
                GameApp.GetInstance().GetGameState().AlreadyCountered = true;
            }

            if (!GameApp.GetInstance().GetGameState().AlreadyPopReview)
            {
                if (GameApp.GetInstance().GetGameState().GetScore() == 3 || GameApp.GetInstance().GetGameState().GetScore() == 6 || GameApp.GetInstance().GetGameState().GetScore() == 9)
                {
                    Debug.Log("Pop Review " + GameApp.GetInstance().GetGameState().GetScore());
                    ReviewDialogUI.GetInstance().ShowDialog();

                    GameApp.GetInstance().GetGameState().AlreadyPopReview = true;
                }
            }
        }


        if (avatar3DFrame != null)
        {
            avatar3DFrame.UpdateAnimation();
        }


        if (fadeTimer.Ready())
        {
            if (fadeTimer.Name == "StartMenu")
            {
                UIResourceMgr.GetInstance().UnloadAllUIMaterials();
                //GameApp.GetInstance().GetGameState().MenuMusicTime = Camera.mainCamera.audio.time;
                Application.LoadLevel(SceneName.START_MENU);
            }
            else
            {
                UIResourceMgr.GetInstance().UnloadAllUIMaterials();
                //GameApp.GetInstance().GetGameState().FirstTimeGame = false;
                GameApp.GetInstance().GetGameState().FromShopMenu = true;

                Application.LoadLevel(SceneName.MAP);

                /*
                 * if (GameApp.GetInstance().GetGameState().FirstTimeGame)
                 * {
                 *  Application.LoadLevel(SceneName.SCENE_TUTORIAL);
                 * }
                 * else
                 * {
                 *  int rnd = Random.RandomRange(0, 100);
                 *  int mod = GameApp.GetInstance().GetGameState().LevelNum % 2;
                 *  if (mod == 0)
                 *  {
                 *      Application.LoadLevel(SceneName.SCENE_HOSPITAL);
                 *  }
                 *  else
                 *  {
                 *      Application.LoadLevel(SceneName.SCENE_ARENA);
                 *  }
                 *
                 *  //else
                 *  {
                 *  //    Application.LoadLevel(SceneName.SCENE_PARKING);
                 *  }
                 * }
                 */
            }

            fadeTimer.Do();
        }
    }