public void ReplaceBullet(Sources.BulletType newBulletType) { var index = GameComponentsLookup.Bullet; var component = (BulletComponent)CreateComponent(index, typeof(BulletComponent)); component.BulletType = newBulletType; ReplaceComponent(index, component); }
public void ReplaceShooter(float newShootDelay, UnityEngine.GameObject newBulletPrefab, float newBulletSpeed, Sources.BulletType newBulletType, int newOneShotSize) { var index = GameComponentsLookup.Shooter; var component = (ShooterComponent)CreateComponent(index, typeof(ShooterComponent)); component.ShootDelay = newShootDelay; component.BulletPrefab = newBulletPrefab; component.BulletSpeed = newBulletSpeed; component.BulletType = newBulletType; component.OneShotSize = newOneShotSize; ReplaceComponent(index, component); }