public void UpdateBulletType(BulletType _bulletType) { // If bullet type is same, do nothing. if (_bulletType == this.bulletType) { return; } this.bulletType = _bulletType; // For no bullet, just clear pool. if (this.bulletType == BulletType.None) { bulletPool?.ClearPooledObjects(); return; } // Once bullet type is changed, need to re-init pool as well. InitBulletPool(); // Run timer so that first spawn time comes immediately. RunBulletShootTimer(0.0f); }