Пример #1
0
 protected Texture2D GetTexture(IGameObject obj)
 {
     if (obj.Texture != null)
     {
         return(obj.Texture);
     }
     else
     {
         ModelColoring coloring = obj.Coloring;
         if (coloring is GradientColor)
         {
             return(ContentLoader.CreateGradient(Screen.GraphicsDevice, coloring as GradientColor));
         }
         else
         {
             return(ContentLoader.CreateTexture(Screen.GraphicsDevice, coloring.MixedColor));
         }
     }
 }