public override void Act(EnemyAI enemyAI) { Attack(enemyAI); }
IEnumerator MoveAndAttack(EnemyAI enemy) { yield return(StartCoroutine(MoveToTarget(enemy.gameObject))); weaponSystem.AttackTarget(enemy.gameObject); }
IEnumerator MoveAndAbility(EnemyAI target) { yield return(StartCoroutine(MoveToTarget(target))); specialAbilities.AttemptSpecialAbility(0, target.gameObject); }
public void UpdateState(EnemyAI enemyAI) { DoActions(enemyAI); CheckTransitions(enemyAI); }
public abstract void Act(EnemyAI enemyAI);
public override void Act(EnemyAI enemyAI) { Patrol(enemyAI); }
private IEnumerator MoveAndPowerAttack(EnemyAI enemy) { yield return(StartCoroutine(MoveToEnemy(enemy))); abilities.UseSpecialAbilty(0, enemy.gameObject); }
IEnumerator MoveAndAttack(EnemyAI target) { yield return(StartCoroutine(MoveAndTarget(target))); weaponSystem.Attack(target.gameObject); }
bool IsTargetInRange(EnemyAI target) { float distanceToTarget = (target.transform.position - transform.position).magnitude; return(distanceToTarget <= weaponSystem.GetWeaponConfig().GetMaxAttackRange()); }
private bool IsEnemyInRange(EnemyAI enemy) { float distanceToTarget = (enemy.transform.position - transform.position).magnitude; return(distanceToTarget <= weponSystem.GetCurrentWepon().GetMaxAttackRange()); }
IEnumerator MoveAndPowerAttack(EnemyAI target) { yield return(StartCoroutine(MoveToTarget(target))); specialAbilities.AttemptSpecialAbility(currentAbilityIndex, target.gameObject); }
public override void Act(EnemyAI enemyAI) { Chase(enemyAI); }
IEnumerator MoveAndPowerAttack(EnemyAI target) { yield return(StartCoroutine(MoveAndTarget(target))); abilities.AttemptSpecialAbility(2, target.gameObject); }
IEnumerator MoveAndPowerAttack(EnemyAI enemy) { yield return(StartCoroutine(MoveToTarget(enemy.gameObject))); abilities.AttemptSpecialAbility(0, enemy.gameObject); }
private void Start() { enemyAI = GetComponent <EnemyAI>(); }
public abstract bool Decide(EnemyAI enemyAI);
// Use this for initialization void Start() { enemy = GetComponentInParent <EnemyAI>(); // Different to way player's health bar finds player healthBarRawImage = GetComponent <RawImage>(); }