Exemple #1
0
 /// <summary>
 /// Returns the string value of RankType seend by the end user.
 /// </summary>
 public static string ToDisplayedString(this RankType context)
 {
     if (context == RankType.XH || context == RankType.X)
     {
         return("SS");
     }
     if (context == RankType.SH)
     {
         return("S");
     }
     return(context.ToString());
 }
Exemple #2
0
    public IEnumerator RankServerConnectCoroutine(RankType rankType, RankServerConnectType serverConnectType, Action <bool> result)
    {
        if (serverConnectType == RankServerConnectType.Select)
        {
            thisWeekRank     = 0;
            thisWeekStage    = 0;
            thisWeekPvPScore = 0;

            lastWeekRank     = 0;
            lastWeekStage    = 0;
            lastWeekPvPScore = 0;

            isReward = true;
        }

        string  php  = "Rank.php";
        WWWForm form = new WWWForm();

        form.AddField("userID", User.Instance.userID);
        form.AddField("type", (int)serverConnectType);
        form.AddField("rankType", rankType.ToString());

        string data  = "";
        string error = "";

        yield return(StartCoroutine(WebServerConnectManager.Instance.WWWCoroutine(php, form, x => data = x, x => error = x)));

        rankServerCoroutine = null;


        bool isResult = false;

        if (string.IsNullOrEmpty(data) == false)
        {
            isResult = true;
            Debug.Log(result);
        }

        if (string.IsNullOrEmpty(error) == false)
        {
            isResult = false;
            Debug.Log(error);
        }

        // 서버 연결 결과
        if (result != null)
        {
            result(isResult);
        }
    }
Exemple #3
0
        public void Initialize(SuitType suit, RankType rank)
        {
            this.suitType = suit;
            this.rankType = rank;
            this.name     = rank.ToString() + " OF " + suit.ToString();

            if (meshInstance == null)
            {
                Awake();
            }
            if (offsetDictionary == null)
            {
                EvaluateAtlas(this.textureAtlas);
            }

            string suitSprite;

            GetSpriteName(out suitSprite);
            SetFace(suitSprite);
        }
 public SetCommanderRankPilot(RankType rank, byte value, double progress)
 {
     Name     = rank.ToString().ToLower();
     Value    = value;
     Progress = progress;
 }
 public SetCommanderRankPilot(RankType rank, byte value)
 {
     Name  = rank.ToString().ToLower();
     Value = value;
 }
Exemple #6
0
    public string NeedToLocalName(RankType needType, int needLevel)
    {
        var model = FindEntityModel((RaceType)Defender.player.raceType, needType.ToString(), needLevel);

        return(model.nameForView);
    }
        public async Task<UserInfo[]> LoadRankingsAsync(string userId, RankType type, int count, string accessToken, bool waitRequests = true)
        {
            using (await WaitRequestAvailability(waitRequests))
            {
                var rankData = (ArrayList)await Call("loadRankings", new
                {
                    id = userId,
                    type = type.ToString().ToLower(),
                    count = count,
                    access_token = accessToken
                });

                return (from Hashtable userData in rankData
                        select new UserInfo
                        {
                            Id = (string)userData["id"],
                            Name = (string)userData["name"],
                            HighScore = int.Parse(userData["highscore"].ToString()),
                            TotalZombies = int.Parse(userData["totalzombies"].ToString()),
                            MapName = (string)userData["mapname"]
                        }).ToArray();
            }
        }