예제 #1
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     if (_shouldUpdate)
     {
         if (_savedHaresPercent == -1)
         {
             _savedHaresPercent   = information.Hares;
             _indicator.sprite    = _savedHaresPercent > GameController.GetInstance().MaxHaresPercent ? _redSprite : _normalSprite;
             _targetRotation      = PercentToDegree(_savedHaresPercent);
             _isAnimationFinished = false;
         }
         else
         {
             int newHaresPercent = information.Hares;
             if (newHaresPercent != _savedHaresPercent)
             {
                 _savedHaresPercent = newHaresPercent;
                 if (_indicator.gameObject.activeInHierarchy)
                 {
                     StartCoroutine(Blink());
                 }
                 _targetRotation      = PercentToDegree(_savedHaresPercent);
                 _isAnimationFinished = false;
             }
         }
     }
 }
예제 #2
0
 private IEnumerator Blink(GameController.StateInformation information)
 {
     for (int i = 0; i < 5; i++)
     {
         _indicator.sprite = i % 2 == 0 ? _blueSprite : _redSprite;
         yield return(new WaitForSeconds(0.2f));
     }
     _indicator.sprite = information.RemainKilled < 2 ? _redSprite : _blueSprite;
 }
예제 #3
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     if (_ticket != information.TicketCount)
     {
         _ticket     = information.TicketCount;
         _bar_left   = true;
         _bar_middle = true;
         _bar_right  = true;
     }
 }
예제 #4
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     if (_shouldUpdate)
     {
         Txt.text = information.RemainKilled < 0 ? "-" : information.RemainKilled.ToString();
     }
     if (_killed != information.RemainKilled)
     {
         _killed    = information.RemainKilled;
         _bar_left  = true;
         _bar_right = true;
         if (_killed == -1)
         {
             _indicator.sprite = information.RemainKilled < 2 ? _redSprite : _blueSprite;
         }
         else
         {
             if (_indicator.gameObject.activeInHierarchy)
             {
                 StartCoroutine(Blink(information));
             }
         }
     }
 }
예제 #5
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     _text.text = Prefix + information.TicketCount;
 }
예제 #6
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     _stateInfo = information;
 }
예제 #7
0
 public void UpdateInfo(GameController.StateInformation information)
 {
     _stateInfo = information;
 }
예제 #8
0
    public void UpdateInfo(GameController.StateInformation information)
    {
        int realNum = information.StationNumber + 1;

        _text.text = realNum.ToString();
    }