public void Attack(GameObject combatTarget) { GetComponent <ActionScheduler>().StartAction(this); target = combatTarget.GetComponent <Health>(); }
public void Attack(GameObject combatTarget) { actionscheduler.StartAction(this); print("i f**k you up!"); target = combatTarget.GetComponent <Health>(); }
public void Cancel() { StopAttack(); target = null; mover.Cancel(); }
public void Attack(CombatTarget combatTarget) { actionScheduler.StartAction(this); target = combatTarget.transform; targetHealth = target.GetComponent <Health>(); }
public void LaunchProjectile(Transform rightHand, Transform leftHand, Health target, GameObject instigator, float calculatedDamage) { Projectile projectileInstance = Instantiate(projectile, GetTransform(rightHand, leftHand).position, Quaternion.identity); projectileInstance.SetTarget(target, instigator, calculatedDamage); }
public void Cancel() { StopAttack(); _target = null; }
//Unsets the target so that we can move and not continue attacking private void CancelAttack() { StopAttack(); m_Target = null; }
public void SetTarget(Health target, float damage) { this.target = target; this.damage = damage; }
void Hit() { Health healthComponent = target.GetComponent <Health>(); healthComponent.TackDamage(weaponDamage); }
public void Cancel() { target = null; StopAttack(); }
// Update is called once per frame void Update() { Health health = target.GetTarget(); textDisplay.text = health ? String.Format($"{health.CurrentHealth}/{health.MaxHealth} {health.GetPercentage():0}%") : "N/A"; }
public void Cancel() { GetComponent <Animator>().ResetTrigger("attack"); GetComponent <Animator>().SetTrigger("stopAttack"); this.target = null; }
public bool GetIsInWeaponRange(Health target) { return(Vector3.Distance(this.transform.position, target.transform.position) < weaponRange); }
public void Cancel() { StopAttackTrigger(); _target = null; GetComponent <Mover>().Cancel(); }
public void LaunchProjectile(Transform rightHand, Transform leftHand, Health target) { Projectile projectileInstance = Instantiate(projectile, GetTransform(rightHand, leftHand).position, Quaternion.identity); projectileInstance.SetTarget(target, weaponDamage); }
public void Cancel() { StopAttack(); target = null; GetComponent <Mover>().Cancel(); }
public void Cancel() { StopAttacking(); target = null; }
public void Attack(GameObject combatTarget) { //implementation of IAction GetComponent <ActionScheduler>().StartAction(this); target = combatTarget.GetComponent <Health>(); //previously combatTarget.transform }