public void SetTarget(CombatStat _combatStats, GameObject _target, int _damage, bool _isPlayer, float _statusChance, float _criticalChance) { combatStats = _combatStats; statusChance = _statusChance; target = _target; damage = _damage; criticalChance = _criticalChance; isPlayer = _isPlayer; //Height and location CapsuleCollider measurements = target.gameObject.GetComponent<CapsuleCollider>(); float height = measurements.height * heightPercentage; targetLocation = new Vector3(target.transform.position.x, target.transform.position.y + height, target.transform.position.z); //Obtain necessary component information if(isPlayer) { player = target.GetComponent<PlayerCombatCharacter>(); } else { enemy = target.GetComponent<EnemyCombatCharacter>(); } launch = true; }
void Awake() { //Connect to Stats combatStats = gameObject.GetComponent<EnemyCombatCharacter>(); //Turn this script off in case its on at the start this.enabled = false; }
// Use this for initialization void Awake () { //Initialise Max Turns - this maybe altered by management through the SetReactionLengths function elementalEffectLength[0] = 0; //Jammed elementalEffectLength[1] = 0; //Molten elementalEffectLength[2] = 0; //Magnetised elementalEffectLength[3] = 0; //Battered elementalEffectLength[4] = 0; //Power Surge elementalEffectLength[5] = 0; //Steam Cloud //Access stats combatStats = gameObject.GetComponent <EnemyCombatCharacter>(); }