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; } } }
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))); }
private void _controller_WaveEnded() { _nextWaveButton.SetActive(true); if (_controller.Wave == _waves.Length || _controller.Health <= 0) { LayersManager.Push <EndGameLayer>().Initialize(_controller.Health > 0); } }
public void OnDuel() { LayersManager.FadeOut(0.5f, () => { LayersManager.Push <DuelStartLayer>(); LayersManager.FadeIn(0.5f, null); }); }
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); }); }
public void OnChampionship() { LayersManager.FadeOut(0.5f, () => { LayersManager.Push <ChampStartLayer>(); LayersManager.FadeIn(0.5f, () => { }); }); }
public static void Push(LayerBase layer) { _instance.Push(layer, true); }
void Start() { LayersManager.Push <BackgroundLayer>(); LayersManager.FadeIn(1f, () => LayersManager.Push <MainMenuLayer>()); }
public void OnNew() { LayersManager.Push <NewMapLayer>(); }
void Start() { LayersManager.Push <MainMenuLayer>(); LayersManager.FadeIn(0.5f, null); }