示例#1
0
 public void SetResource(Resources resource)
 {
     _resource = resource;
     switch (resource)
     {
         case Resources.None:
             _colour = Color.White;
             break;
         case Resources.Iron:
             _colour = Color.LightSteelBlue;
             break;
         case Resources.Hydrogen:
             _colour = Color.Peru;
             break;
         case Resources.Unobtanium:
             _colour = Color.LightSlateGray;
             break;
     }
 }
示例#2
0
 public Planet(Resources resource, Texture2D texture, Vector2 position, Vector2 velocity)
     : base(texture, position, velocity)
 {
     SetResource(resource);
 }
示例#3
0
 public Planet(Resources resource, Texture2D texture, Vector2 position, Vector2 velocity, double mass, float radius)
     : base(texture, position, velocity, mass, radius)
 {
     SetResource(resource);
 }
示例#4
0
 public Planet(Resources resource, Texture2D texture)
     : base(texture)
 {
     SetResource(resource);
 }