public void StartOutlawBattle(AnimalParty playerParty, AnimalParty outlawParty) { this.playerParty = playerParty; this.outlawParty = outlawParty; isOutlawBattle = true; player = playerParty.GetComponent <PlayerController>(); outlaw = outlawParty.GetComponent <OutlawController>(); StartCoroutine(SetupBattle()); }
void EndBattle(bool won) { if (outlaw != null && won == true) { outlaw.BattleLost(); outlaw = null; } state = GameState.FreeRoam; battleSystem.gameObject.SetActive(false); worldCamera.gameObject.SetActive(true); }
public void StartOutlawBattle(OutlawController outlaw) { state = GameState.Battle; battleSystem.gameObject.SetActive(true); worldCamera.gameObject.SetActive(false); this.outlaw = outlaw; var playerParty = playerController.GetComponent <AnimalParty>(); var outlawParty = outlaw.GetComponent <AnimalParty>(); battleSystem.StartOutlawBattle(playerParty, outlawParty); }