AngryTanks.Client.Player.GetTexture C# (CSharp) Method

GetTexture() protected static method

protected static GetTexture ( AngryTanks.Client.World world, PlayerInformation playerInfo ) : Microsoft.Xna.Framework.Graphics.Texture2D
world AngryTanks.Client.World
playerInfo PlayerInformation
return Microsoft.Xna.Framework.Graphics.Texture2D
        protected static Texture2D GetTexture(World world, PlayerInformation playerInfo)
        {
            try
            {
                return world.Content.Load<Texture2D>(String.Format("textures/tank_{0}", ProtocolHelpers.TeamTypeToName(playerInfo.Team)));
            }
            catch (ContentLoadException e)
            {
                Log.Error(e.Message);
                Log.Error(e.StackTrace);
                return world.Content.Load<Texture2D>("textures/tank_white");
            }
        }