Exemple #1
0
 private void Update()
 {
     if (Places == null)
     {
         return;
     }
     for (int i = 0; i < Places.Length; i++)
     {
         if (IsValidPlayer(Places[i]))
         {
             PlaceImages[i].gameObject.SetActive(true);
             var index = Places[i] - OyaPlayerIndex;
             if (index < 0)
             {
                 index += TotalPlayers;
             }
             if (index > TotalPlayers)
             {
                 index -= TotalPlayers;
             }
             PlaceImages[i].sprite = Images.Get(index);
         }
         else
         {
             PlaceImages[i].gameObject.SetActive(false);
         }
     }
 }
Exemple #2
0
 public void SetPoints(string playerName, int points, int place)
 {
     rect = GetComponent <RectTransform>();
     PlayerNameText.text = playerName;
     PointController.SetNumber(points);
     PlaceNumber.sprite    = NumberBundle.Get(place);
     PlaceCharacter.sprite = CharacterBundle.Get(place);
 }
Exemple #3
0
        private void SetAbsNumber(int number, SpriteBundle bundle)
        {
            var digits = ClientUtil.GetDigits(number);

            for (int i = 0; i < digits.Count; i++)
            {
                var obj = Instantiate(DigitPrefab, NumberParent);
                obj.name = $"Digit{i}";
                var image = obj.GetComponent <Image>();
                image.sprite = bundle.Get(digits[i]);
            }
        }
Exemple #4
0
 public void SetPlace(int place)
 {
     PlaceNumber.sprite    = NumberBundle.Get(place);
     PlaceCharacter.sprite = CharacterBundle.Get(place);
 }