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<PlayerCombatCharacter>(); //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] = 1; //Jammed elementalEffectLength[1] = 1; //Molten elementalEffectLength[2] = 1; //Magnetised elementalEffectLength[3] = 1; //Battered elementalEffectLength[4] = 0; //Power Surge elementalEffectLength[5] = 1; //Steam Cloud //Access stats combatStats = gameObject.GetComponent <PlayerCombatCharacter>(); }
public void SetPlayerStat(GameObject _player) { playerStat = _player.GetComponent<PlayerCombatCharacter>(); }
void Awake() { //Connect to stats combatStats = gameObject.GetComponent<PlayerCombatCharacter>(); //Find and reference the selector selector = GameObject.FindGameObjectWithTag("Combat Selector").transform; //Turn this script off in case its on at the start this.enabled = false; }