public PlayBattleState(BattleSceneController BattleSceneControllerRef) : base(BattleSceneControllerRef) { BattleSystem.Get().OnTimerFinished += SetNextState; BattleSystem.Get().SetPlayBattleState(); BattleHud.Get().SetPlayBattleState(); }
public InitialBattleState(BattleSceneController BattleSceneControllerRef) : base(BattleSceneControllerRef) { BattleHud.Get().SetInitialBattleState(); BattleSystem.Get().SetInitialBattleState(); BattleSceneControllerCached.BattleState = new MainBattleState(BattleSceneControllerCached); }
private void Start() { BattleSystem.Get().OnBattleFinished += OnBattleFinished; BattleView.Initialize(); BattleHud.Get().Initialize(); BattleState = new InitialBattleState(this); }
public MainBattleState(BattleSceneController BattleSceneControllerRef) : base(BattleSceneControllerRef) { BattleHud.Get().OnPlayBattleButtonEvent += SetPlayState; WindowManager.OnDiscardWindowOpened += SetDiscardState; BattleSystem.Get().SetMainBattleState(); BattleSceneControllerRef.BattleView.SetBattleCardsControlStrategy(); }
public void RegenerateBoard() { List <CardWrapper> alliedCards = null; alliedCards = BoardCached.AlliedTimeline?.RemoveCardsFromTimeline(); BoardCached.RegenerateTimelinesAndTimerView(); if (alliedCards != null) { foreach (CardWrapper card in alliedCards) { if (!BoardCached.AlliedTimeline.TryAddCard(card)) { HandCached.AddCard(card); } } } BattleHud.Get().UpdateStatuses(GetStatusPosition(BoardCached.AlliedTimeline), GetStatusPosition(BoardCached.EnemyTimeline)); }
public LoseBattleState(BattleSceneController BattleSceneControllerRef) : base(BattleSceneControllerRef) { BattleSystem.Get().StopBattleTimer(); BattleHud.Get().OpenWindow <LoseWindow>(); }
private void UnsubscribeAll() { BattleHud.Get().OnPlayBattleButtonEvent -= SetPlayState; WindowManager.OnDiscardWindowOpened -= SetDiscardState; }