/// <summary> /// Constructor: Creates a HUD with a specified number of bars /// </summary> public HUD(int _numBars) { numBars = _numBars; bars = new HUD_Bar[NumBars]; for (int i = 0; i < bars.Length; i++) { bars[i] = HUD_Bar.getDefaultHUD_Bar(); } LoadContent(); }
/// <summary> /// Returns a standard left-oriented HUD_Bar located at the origin /// </summary> public static HUD_Bar getDefaultHUD_Bar() { HUD_Bar bar = new HUD_Bar(); bar.Max = 100; bar.Min = 0; bar.Value = 100; bar.Scale = 1.0f; bar.Origin = new Vector2(0, 0); bar.BarColor = defaultColor; bar.Opacity = defaultOpacity; bar.Orientation = HUDOrientation.LEFT; bar.TextEnabled = true; bar.TOrientation = TextOrientation.BOTTOMLEFT; bar.holding = false; return(bar); }
/// <summary> /// Returns a standard left-oriented HUD_Bar located at the origin /// </summary> public static HUD_Bar getDefaultHUD_Bar() { HUD_Bar bar = new HUD_Bar(); bar.Max = 100; bar.Min = 0; bar.Value = 100; bar.Scale = 1.0f; bar.Origin = new Vector2(0, 0); bar.BarColor = defaultColor; bar.Opacity = defaultOpacity; bar.Orientation = HUDOrientation.LEFT; bar.TextEnabled = true; bar.TOrientation = TextOrientation.BOTTOMLEFT; bar.holding = false; return bar; }