Esempio n. 1
0
 public void OnPlay()
 {
     foreach (var map in _mapList)
     {
         if (map.Selected)
         {
             int startMoney;
             if (!int.TryParse(_startMoney.text, out startMoney))
             {
                 startMoney = 4000;
             }
             int lives;
             if (!int.TryParse(_lives.text, out lives))
             {
                 lives = 20;
             }
             LayersManager.FadeOut(0.5f, () =>
             {
                 LayersManager.Push <GameLayer>().Initialize(map.Text, _waves.Select(w => w.GetWave()).ToArray(), startMoney, lives);
                 LayersManager.FadeIn(0.5f, () =>
                 {
                 });
             });
             break;
         }
     }
 }
Esempio n. 2
0
 private void Button_Clicked(AIPlayerModel aiplayer)
 {
     LayersManager.FadeOut(0.25f, () =>
     {
         LayersManager.Push <VersusLayer>().BeginVersus(aiplayer);
         LayersManager.FadeIn(0.25f, null);
     });
 }
        public void BeginVersus(Battle currentPlayerBattle)
        {
            _aiPlayerIcon.sprite = currentPlayerBattle.Player2.Icon;
            _animator.SetBool("Versus", true);


            StartCoroutine(VersusRoutine(() => LayersManager.Push <BattleLayer>().Begin(currentPlayerBattle)));
        }
        public void BeginVersus(AIPlayerModel aIPlayer)
        {
            _aiPlayerIcon.sprite = aIPlayer.Icon;
            _animator.SetBool("Versus", true);


            StartCoroutine(VersusRoutine(() => LayersManager.Push <BattleLayer>().Begin(aIPlayer)));
        }
Esempio n. 5
0
 private void _controller_WaveEnded()
 {
     _nextWaveButton.SetActive(true);
     if (_controller.Wave == _waves.Length || _controller.Health <= 0)
     {
         LayersManager.Push <EndGameLayer>().Initialize(_controller.Health > 0);
     }
 }
Esempio n. 6
0
 public void OnDuel()
 {
     LayersManager.FadeOut(0.5f, () =>
     {
         LayersManager.Push <DuelStartLayer>();
         LayersManager.FadeIn(0.5f, null);
     });
 }
Esempio n. 7
0
 public void OnFight()
 {
     LayersManager.FadeOut(0.25f, () =>
     {
         LayersManager.Push <VersusLayer>().BeginVersus(_currentPlayerBattle);
         LayersManager.FadeIn(0.25f, null);
     });
 }
 public void OnOk()
 {
     LayersManager.FadeOut(0.25f, () =>
     {
         LayersManager.Pop();
         LayersManager.Push <ChampLayer>().NewPlayer(_playerName.text);
         LayersManager.FadeIn(0.25f, null);
     });
 }
Esempio n. 9
0
 public void OnChampionship()
 {
     LayersManager.FadeOut(0.5f, () =>
     {
         LayersManager.Push <ChampStartLayer>();
         LayersManager.FadeIn(0.5f, () =>
         {
         });
     });
 }
Esempio n. 10
0
 public static void Push(LayerBase layer)
 {
     _instance.Push(layer, true);
 }
 void Start()
 {
     LayersManager.Push <BackgroundLayer>();
     LayersManager.FadeIn(1f, () => LayersManager.Push <MainMenuLayer>());
 }
Esempio n. 12
0
 public void OnNew()
 {
     LayersManager.Push <NewMapLayer>();
 }
Esempio n. 13
0
 void Start()
 {
     LayersManager.Push <MainMenuLayer>();
     LayersManager.FadeIn(0.5f, null);
 }