void Awake() { //Find and allocate the referenced objects and scripts in the scene _muzzleFlash = gameObject.GetComponentInChildren <MuzzleFlash>(); _midPoint = GameObject.Find("MidPoint"); _anim = gameObject.GetComponent <Animator>(); _agent = gameObject.GetComponent <NavMeshAgent>(); _obstacle = gameObject.GetComponent <NavMeshObstacle>(); _combatUI = GameObject.Find("_combatMan").GetComponent <CombatUI>(); _calcDam = GameObject.Find("_combatMan").GetComponent <CalculateDamage>(); _targetedEnemy = GameObject.Find("_combatMan").GetComponent <TargetedEnemy>(); _moveIndicator = GameObject.Find("Player").GetComponent <MoveIndicator>(); _playerTurnUI = GameObject.Find("PlayerTurn"); _cam = GameObject.Find("_cameraParent").GetComponent <CameraController>(); _combatOver = GameObject.Find("EndCanvas").GetComponent <CombatOver>(); _aux = GameObject.Find("_combatMan").GetComponent <AuxilliaryPower>(); //Determine player stats based off _ap = _CombatManager._maxAP; _combatUI.Initialize(); //Prepare the elements used for navigation _mask = ~_mask; _path = new NavMeshPath(); _aux.Initialize(); }
public void SetButton(int i) { _CombatManager._auxPower = i; CloseMenu(); _aux.Initialize(); }