using Microsoft.Xna.Framework; using Penguloon.Objects; namespace Penguloon.Projectiles { class CannonballProjectile : ProjectileBase { public CannonballProjectile(ObjectBase ParentObject, float RotationAngle, int extraPops = 0) : base(ParentObject, RotationAngle) { this.Texture = ContentManager.GetTexture("Bullets/cannon-ammo"); this.Speed = 450f; this.RotationSpeed = 5f; this.Size = new Vector2(ParentObject.Map.TileWidth / 2, ParentObject.Map.TileHeight / 2); this.MaxBalloonPops = 5 + extraPops; Rectangle parentRec = new Rectangle(ParentObject.Position.ToPoint(), new Point(ParentObject.TileSpanX * ParentObject.Map.TileWidth, ParentObject.TileSpanY * ParentObject.Map.TileHeight)); this.Position = new Vector2(ParentObject.Position.X + (parentRec.Width / 2) - (Size.X / 2), ParentObject.Position.Y + (parentRec.Height / 2) - (Size.Y / 2)); } } }