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; } }
public Planet(Resources resource, Texture2D texture, Vector2 position, Vector2 velocity) : base(texture, position, velocity) { SetResource(resource); }
public Planet(Resources resource, Texture2D texture, Vector2 position, Vector2 velocity, double mass, float radius) : base(texture, position, velocity, mass, radius) { SetResource(resource); }
public Planet(Resources resource, Texture2D texture) : base(texture) { SetResource(resource); }