Пример #1
0
        private static void DownloadAchievedEmblemTextrure(object url)
        {
            Texture2D t = DownloadTexture2D.n_Remote_Texture2D(Core.GraphicsDevice, url.ToString(), true);

            achieved_emblem_Texture = t;

            displayEmblemDelay = 35f;
        }
Пример #2
0
        public static Texture2D GetOnlineSprite(string GameJoltID)
        {
            if (API.UserBanned(GameJoltID))
            {
                return(null);
            }

            if (TempDownloadedSprites.ContainsKey(GameJoltID) == true)
            {
                Texture2D tempT = TempDownloadedSprites[GameJoltID];
                return(tempT);
            }

            Texture2D t = DownloadTexture2D.n_Remote_Texture2D(Core.GraphicsDevice, "" + GameJoltID + ".png", false);

            // CLASSIFIED

            if (TempDownloadedSprites.ContainsKey(GameJoltID) == false)
            {
                TempDownloadedSprites.Add(GameJoltID, t);
            }

            if ((t != null))
            {
                if (t.Width >= 96 && t.Height >= 128)
                {
                    if (t.Width / 3 == t.Height / 4)
                    {
                        return(t);
                    }
                }
            }
            else
            {
                Logger.Debug("GetOnlineSprite.vb: Getting sprite for " + GameJoltID + " failed.");
            }

            return(null);
        }