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; } } } }
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; }
public void UpdateInfo(GameController.StateInformation information) { if (_ticket != information.TicketCount) { _ticket = information.TicketCount; _bar_left = true; _bar_middle = true; _bar_right = true; } }
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)); } } } }
public void UpdateInfo(GameController.StateInformation information) { _text.text = Prefix + information.TicketCount; }
public void UpdateInfo(GameController.StateInformation information) { _stateInfo = information; }
public void UpdateInfo(GameController.StateInformation information) { int realNum = information.StationNumber + 1; _text.text = realNum.ToString(); }