Beispiel #1
0
 private void CleanupScoreView()
 {
     if (scoreView_ != null)
     {
         ObjectPoolManager.Recycle(scoreView_);
         scoreView_ = null;
     }
 }
Beispiel #2
0
        protected override void Activate()
        {
            timeSpentInArea_.Clear();

            PlayerSpawner.SpawnAllPlayers();

            List <GameModeIntroView.Icon> icons = new List <GameModeIntroView.Icon>();

            foreach (Player player in RegisteredPlayers.AllPlayers)
            {
                icons.Add(GameModeIntroView.Icon.Player);
                icons.Add(GameModeIntroView.Icon.Swords);
            }
            icons.RemoveLast();

            GameModeIntroView.Show(DisplayTitle, icons);

            MonoBehaviourWrapper.OnUpdate += HandleUpdate;
            PlayerSpawner.ShouldRespawn    = true;

            CleanupScoreView();
            scoreView_ = ObjectPoolManager.CreateView <KingOfTheHillScoreView>(GamePrefabs.Instance.KotHScoreViewPrefab);
            scoreView_.Init(this);
        }