public ProgressSquare(ContentManager cm, Rectangle area, string spriteName) { tick = new HenrySprite(cm); text = new HenryText(new Vector2(area.Center.X, area.Center.Y-15), cm.Load<SpriteFont>("ButtonFont")); text.Color = Color.White; tick.LoadContent(spriteName, true, 5); tick.Scale = area.Height / tick.Size.Y; this.area = area; borderPixel = new HenrySprite(cm); borderPixel.LoadContent("WhiteDot", false); }
public ProgressBar(ContentManager cm, Rectangle area, string spriteName) { tick = new HenrySprite(cm); text = new HenryText(new Vector2(area.Center.X, area.Center.Y-15), cm.Load<SpriteFont>("ButtonFont")); text.Color = Color.White; tick.LoadContent(spriteName, true, 5); tick.Scale = area.Height / tick.Size.Y; this.area = area; borderPixel = new HenrySprite(cm); borderPixel.LoadContent("WhiteDot", false); //RNSEB.Win.ClientSizeChanged += new EventHandler<EventArgs>(ResolutionChange); }
public HenryBoss(ContentManager cm, HenryBattlefield b, float mass, Vector2 initPos, Vector2 initVel, float damping) : base(cm, b, 4000, mass, initPos, initVel, damping) { spawnerType = "Boss"; this.LoadContent("BossIdle", true); //initally idle this.CenterOrigin(); this.Animate = true; this.HitRadius = 65; EnginePower = 30.0f; staticFieldSprite = new HenrySprite(cm); staticFieldSprite.LoadContent("BossStaticField", true); staticFieldSprite.CenterOrigin(); staticFieldSprite.Scale = 0.6f; //starter weapon LaunchBays.Add(new LaunchBay(this, 0.6f, "PeaShooter", 100)); }
public List<WeaponIndicator> Weapons = new List<WeaponIndicator>(); //a list of all the weapons in this weapon bar #endregion Fields #region Constructors //functions public WeaponBar() { selectorSquare = new HenrySprite(RNSEB.cm); selectorSquare.LoadContent("SelectorSquare", true, 10); selectorSquare.Position = this.Position; }
public bool Collision(HenrySprite that) { if (Math.Sqrt(Math.Pow(that.Position.X - this.Position.X, 2) + Math.Pow(that.Position.Y - this.Position.Y, 2)) < this.HitRadius + that.HitRadius) return true; else return false; }