public Fireball(Vector2 position, bool isRight, bool isEnemyFireball) { expirationBuffer = GameValues.FireBallExpirationBuffer; fireballStateTransitionMachine = new FireballStateTransitionMachine(); sprite = AnimatedSpriteFactory.Instance.BuildFireballSprite(position); CollisionRectangle = sprite.SpriteDestinationRectangle; this.Position = new Vector2(position.X, position.Y); // isRight is determined by if Mario is facing right or left, which leads to which direction // this fireball should go. if (isRight) { this.Velocity = GameValues.FireBallVelocity; this.MaxVelocity = GameValues.FireBallMaxVelocity; } else { this.Velocity = -GameValues.FireBallVelocity; this.MaxVelocity = GameValues.FireBallMaxVelocity; } this.IsAlive = false; this.IsEnemyFireball = isEnemyFireball; }