evgeni_tsn

Untitled

Nov 30th, 2015
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.94 KB | None | 0 0
  1. public override string ToString()
  2.         {
  3.             var output = new StringBuilder();
  4.             output.AppendLine(string.Format("--{0} - {1}", this.Name, this.GetType().Name));
  5.  
  6.             if (this.Health <= 0)
  7.             {
  8.                 output.AppendLine("(Destroyed)");
  9.             }
  10.             else
  11.             {
  12.                 output.AppendLine($"-Location: {this.Location.Name}");
  13.                 output.AppendLine($"-Health: {this.Health}");
  14.                 output.AppendLine($"-Shields: {this.Shields}");
  15.                 output.AppendLine($"-Damage: {this.Damage}");
  16.                 output.AppendLine($"-Fuel: {this.Fuel}");
  17.                 foreach (var enhancement in Enhancements)
  18.                 {
  19.                     output.AppendLine($"-Enhancements: {enhancement}");
  20.                 }
  21.                 //-Enhancements: ExtendedFuelCells, KineticBarrier
  22.             }
  23.             return output.ToString();
  24.         }
Advertisement
Add Comment
Please, Sign In to add comment