void SetAppropriateBulletPool() { switch (bulletType) { case BulletType.SLOW: bulletPool = SimpleBulletPool.GetPool(SimpleBulletPool.BulletPoolType.ENEMY_SLOW); break; case BulletType.NORMAL: bulletPool = SimpleBulletPool.GetPool(SimpleBulletPool.BulletPoolType.ENEMY_NORMAL); break; case BulletType.FAST: bulletPool = SimpleBulletPool.GetPool(SimpleBulletPool.BulletPoolType.ENEMY_FAST); break; default: throw new UnityException("unknown bullet type " + bulletType.ToString()); } }
void Start() { normalBulletPool = SimpleBulletPool.GetPool(SimpleBulletPool.BulletPoolType.FRIENDLY_NORMAL); fastBulletPool = SimpleBulletPool.GetPool(SimpleBulletPool.BulletPoolType.FRIENDLY_FAST); RespawnReset(); }