Exemplo n.º 1
0
 public HudString(Game game, string fontName, HudLocation screenLocation) : base(game)
 {
     this.fontName       = fontName;
     this.screenLocation = screenLocation;
     this.DrawOrder      = int.MaxValue;
     displayString       = "HUD string not set";
 }
Exemplo n.º 2
0
 public Credit(Game game, string fontName, HudLocation screenLocation)
     : base(game, fontName, screenLocation)
 {
     if (Game.Services.GetService <Credit>() == null)
     {
         Game.Services.AddService <Credit>(this);
     }
 }
Exemplo n.º 3
0
 public GameOverHud(Game game, string fontName, HudLocation screenLocation)
     : base(game, fontName, screenLocation)
 {
     if (Game.Services.GetService <GameOverHud>() == null)
     {
         Game.Services.AddService <GameOverHud>(this);
     }
 }
Exemplo n.º 4
0
 public AnimalsDead(Game game, string fontName, HudLocation screenLocation)
     : base(game, fontName, screenLocation)
 {
     if (Game.Services.GetService <AnimalsDead>() == null)
     {
         Game.Services.AddService <AnimalsDead>(this);
     }
 }
Exemplo n.º 5
0
 public HighScoreList(Game game, string fontName, HudLocation screenLocation)
     : base(game, fontName, screenLocation)
 {
     if (Game.Services.GetService <HighScoreList>() == null)
     {
         Game.Services.AddService <HighScoreList>(this);
     }
 }
 public static Element Hud(
     IWorkshopTree players   = null,
     IWorkshopTree header    = null, IWorkshopTree subheader     = null, IWorkshopTree text = null,
     HudLocation location    = HudLocation.Top, double?sortOrder = null,
     Color headerColor       = Color.White, Color subheaderColor = Color.White, Color textColor = Color.White,
     HudTextRev reevaluation = HudTextRev.VisibleToSortOrderAndString, Spectators spectators = Spectators.DefaultVisibility)
 =>
 Element.Part <A_CreateHudText>(
     players ?? Element.Part <V_AllPlayers>(),
     header ?? Element.Part <V_Null>(),
     subheader ?? Element.Part <V_Null>(),
     text ?? Element.Part <V_Null>(),
     EnumData.GetEnumValue(location),
     new V_Number(sortOrder == null ? 0 : sortOrder.Value),
     EnumData.GetEnumValue(headerColor),
     EnumData.GetEnumValue(subheaderColor),
     EnumData.GetEnumValue(textColor),
     EnumData.GetEnumValue(reevaluation),
     EnumData.GetEnumValue(spectators)
     );