public void FillDelegates() { HealthLevels.Instance.SetEnemyHealth(200); HealthLevels.Instance.CombatEndVictoryCall += Victory; HealthLevels.Instance.CombatEndDefeatCall += Defeat; CombatOverCall += RefreshCombat; }
public void ClearDelegates() { CombatInfoCall = null; AnimationSpeedCall = null; BeatTrackNoteCall = null; AdvanceIndexCall = null; NoMoreBeatsCall = null; CombatOverCall = null; }
void Start() { //Initialize the scripts _player = GameObject.Find("Player").GetComponent <PlayerTurn>(); _generator = gameObject.GetComponent <CombatGenerator>(); _combatOver = GameObject.Find("EndCanvas").GetComponent <CombatOver>(); //Initialize the _enemy script by picking one from the _generator script for (int i = 1; i < _generator._sortedInit.Count; i++) { if (_generator._sortedInit[i]._charName != "Player") { _enemy = _generator._sortedInit[i]._go.GetComponent <EnemyScript>(); } } //Begin the turn ActivateGO(); }
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(); }