void Start() { //Find the main manager SubManagerDelegate subDelegate = GameObject.Find("MainManager").GetComponent <SubManagerDelegate>(); SetUp(subDelegate); Battle battle = _delegate.GetBattle(); StartBattle(battle); }
public void SetUp(SubManagerDelegate battleDelegate) { Debug.Log("setting up for battle"); _delegate = battleDelegate; _delegate.SetSubManager(this); _turnManager = new TurnManager(this); _enemyManager.SetUp(this); _categoryManager.SetUp(this); StatusBar playerHealthBar = GameObject.Find("Player Health").GetComponent <StatusBar>(); StatusBar playerClimaxBar = GameObject.Find("Player Climax").GetComponent <StatusBar>(); _playerActionManager = new PlayerActionManager(_delegate.GetPlayer(), playerHealthBar, playerClimaxBar); _moveMenu.SetUp(this); _infoLabelManager.SetUp(_playerActionManager); _battleTextFactory = new BattleTextFactory(); _battleMenuManager.SetUp(this); }
void Start() { //Find the main manager _delegate = GameObject.Find("MainManager").GetComponent <SubManagerDelegate>(); }