Beispiel #1
0
 /// <summary>
 /// Hud Item Class
 /// </summary>
 /// <param name="name">name of item</param>
 /// <param name="image">texture</param>
 /// <param name="position">position type</param>
 /// <param name="percentx">percentage width of screen</param>
 /// <param name="percenty">percentage height of screen</param>
 /// <param name="offset">offset</param>
 public HUDItem(string name, Texture2D image, HudItemPos position, float percenty, Vector2 offset, int titleheight, int titlewidth, int titlex, int titley)
 {
     tex       = image;
     itemPos   = position;
     texOffset = offset;
     percentH  = percenty;
     nam       = name;
     theight   = titleheight;
     twidth    = titlewidth;
     tx        = titlex;
     ty        = titley;
 }
Beispiel #2
0
 public void AddHudItem(Texture2D hudTexture, HudItemPos position, Vector2 offset, float percentageHeight, string name)
 {
     hudItems.Add(new HUDItem(name, hudTexture, position, percentageHeight, offset, 1, 1, 1, 1));
 }
Beispiel #3
0
 /// <summary>
 /// Hud Item Class
 /// </summary>
 /// <param name="name">name of item</param>
 /// <param name="image">texture</param>
 /// <param name="position">position type</param>
 /// <param name="percentx">percentage width of screen</param>
 /// <param name="percenty">percentage height of screen</param>
 /// <param name="offset">offset</param>
 public Lifebar(string name, Texture2D image, HudItemPos position, float percenty, Vector2 offset, Character ch, int titleheight, int titlewidth, int titlex, int titley)
     : base(name, image, position, percenty, offset, titleheight, titlewidth, titlex, titley)
 {
     this.ch = ch;
 }
 /// <summary>
 /// Hud Item Class
 /// </summary>
 /// <param name="name">name of item</param>
 /// <param name="image">texture</param>
 /// <param name="position">position type</param>
 /// <param name="percentx">percentage width of screen</param>
 /// <param name="percenty">percentage height of screen</param>
 /// <param name="offset">offset</param>
 public Consumables(string name, Texture2D image, HudItemPos position, float percenty, Vector2 offset, int lifeAmount, int titleheight, int titlewidth, int titlex, int titley, SpriteFont lifeFont)
     : base(name, image, position, percenty, offset, titleheight, titlewidth, titlex, titley)
 {
     amount = lifeAmount;
     font   = lifeFont;
 }