public TurretBarrel() { barrelState = Constants.TurretBarrelState.Idle; projectileType = Constants.ProjectileType.PlasmaBall; Projectiles = new List<Projectile>(); Firerate = 500; }
public Projectile(Constants.ProjectileType type, Vector2 position, float barrelRotation) { Initialize(); IsActive = true; PenetratedEnemies = new List<Enemy>(); Direction = new Vector2((float)Math.Cos(barrelRotation), (float)Math.Sin(barrelRotation)); this.Velocity = new Vector3(Direction.X * TangentialVelocity, Direction.Y * TangentialVelocity, 0); this.projectileType = type; Position = position; }