// Use this for initialization void Start() { instance = this; radius = GetComponent <SphereCollider>().radius + 5f; wolves = new List <GameObject>(); nextIncrease = Time.time + increaseTime; }
// Use this for initialization void Start() { spawner = WolfSpawner.instance; position = transform.position; velocity = Vector3.zero; acceleration = Vector3.zero; sneaking = true; }
public void Bark() { if (wolfSpawner == null) { wolfSpawner = WolfSpawner.instance; } List <GameObject> wolves = wolfSpawner.GetNearbyWolves(transform.position, radius); foreach (GameObject wolf in wolves) { wolf.GetComponent <WolfAI>().Scare(); } List <GameObject> sheps = SheepManager.instance.GetNearestSheeps(transform.position, radius); foreach (GameObject shep in sheps) { shep.GetComponent <SheepAINoHerd>().BarkedAt(); } }
// Use this for initialization void Start() { wolfSpawner = WolfSpawner.instance; radius = GetComponent <SphereCollider>().radius; rb = GetComponent <Rigidbody>(); }