// Use this for initialization protected virtual void Start () { agent = GetComponent<NavMeshAgent>(); agent.speed = Random.Range(0.5f, 2.0f); agent.stoppingDistance = acceptableDistance; attacker = GetComponent<BaseAttacker>(); attacker.target = gameManager.GetComponent<GameManager>().player; player = gameManager.GetComponent<GameManager> ().player; }
public virtual void CauseDamage(BaseAttacker baseAttacker) { baseAttacker.ReceiveDamage(damageCaused); }