// Use this for initialization void Start() { _prefabManager = GameObject.Find("PrefabManager").GetComponent <PrefabManager>(); _bullet = _prefabManager.Get("bullet").GetComponent <Rigidbody>(); _bullet.GetComponent <Projectile>().SetDamage(Damage); Ready = true; Damage = BaseDamage = 10; FireDelay = BaseDelay = 0.5f; Velocity = BaseVelocity = 70f; }
public IEnumerator SpawnEnemies(Dictionary <BossColour, int> enemies) { WaitForSeconds wait = new WaitForSeconds(1.5f); foreach (KeyValuePair <BossColour, int> kv in enemies) { for (int i = 0; i < kv.Value; i++) { Instantiate(_prefabManager.Get("follower_" + kv.Key), RandomPoint(), transform.rotation); if (i % 3 == 0) { yield return(wait); } } } }
// Use this for initialization void Start() { _prefabManager = GameObject.Find("PrefabManager").GetComponent <PrefabManager>(); _splatObj = _prefabManager.Get("Splat"); }