Ejemplo n.º 1
0
 static byte[] calculateVotes(LJEHDCNEKBG[] states)
 {
     byte[] self = new byte[states.Length + 1];
     for (int i = 0; i < states.Length; i++)
     {
         LJEHDCNEKBG playerVoteArea = states[i];
         if (playerVoteArea.didVote)
         {
             if (playerVoteArea.votedFor + 1 >= 0 && playerVoteArea.votedFor + 1 < self.Length)
             {
                 self[playerVoteArea.votedFor + 1]++;
             }
         }
     }
     return(self);
 }
Ejemplo n.º 2
0
            public static void PopulateResults(GPOHFPAIEMA __instance, byte[] states, byte[] votes)
            {
                __instance.TitleText.Text = "Voting Results";
                int num = 0;

                for (int i = 0; i < __instance.OMJGIAMFODK.Length; i++)
                {
                    LJEHDCNEKBG playerVoteArea = __instance.OMJGIAMFODK[i];
                    playerVoteArea.ClearForResults();
                    int num2 = 0;
                    for (int j = 0; j < states.Length; j++)
                    {
                        if ((states[j] & 128) == 0)                           //!isDead
                        {
                            BAGGGBBOHOH.FGMBFCIIILC playerById = BAGGGBBOHOH.Instance.GetPlayerById((byte)__instance.OMJGIAMFODK[j].AGGEFFKBKLE);
                            int votedFor = (sbyte)votes[j];

                            SpriteRenderer spriteRenderer = UnityEngine.Object.Instantiate <SpriteRenderer>(__instance.PlayerVotePrefab);
                            if (GLHCHLEDNBA.GameOptions.IAFJLBELLDA)
                            {
                                GLHCHLEDNBA.SetPlayerMaterialColors(KPNJLIGHOEI.BAOLBIKEKEK, spriteRenderer);
                            }
                            else
                            {
                                GLHCHLEDNBA.SetPlayerMaterialColors((int)playerById.LMDCNHODEAN, spriteRenderer);
                            }
                            spriteRenderer.transform.localScale = Vector3.zero;

                            if ((int)playerVoteArea.AGGEFFKBKLE == votedFor)
                            {
                                spriteRenderer.transform.SetParent(playerVoteArea.transform);
                                spriteRenderer.transform.localPosition = __instance.GOCOEAPLJFA + new Vector3(__instance.OHFLCOGINJN.x * (float)num2, 0f, 0f);
                                __instance.StartCoroutine(JDBGLNAEBLG.GBIKBPPNKEB((float)num2 * 0.5f, spriteRenderer.transform, 1f, 0.5f));
                                num2++;
                            }
                            else if (i == 0 && votedFor == -1)
                            {
                                spriteRenderer.transform.SetParent(__instance.SkippedVoting.transform);
                                spriteRenderer.transform.localPosition = __instance.GOCOEAPLJFA + new Vector3(__instance.OHFLCOGINJN.x * (float)num, 0f, 0f);
                                __instance.StartCoroutine(JDBGLNAEBLG.GBIKBPPNKEB((float)num * 0.5f, spriteRenderer.transform, 1f, 0.5f));
                                num++;
                            }
                        }
                    }
                }
            }