示例#1
0
    // Private

    private void DisplayDeathUI(bool hasRewindsLeft)
    {
        WorldUIManager.DisplayBanner(WorldUiElement.MainBanner);
        WorldUIManager.DisplayBanner(WorldUiElement.SubBanner);

        if (hasRewindsLeft)
        {
            WorldUIManager.SetBannerText(WorldUiElement.MainBanner, "Try That Again");
            WorldUIManager.SetBannerText(WorldUiElement.SubBanner, "Hold L1 or Backspace to rewind.");
        }
        else
        {
            WorldUIManager.SetBannerText(WorldUiElement.MainBanner, "Out of Rewinds");
            WorldUIManager.SetBannerText(WorldUiElement.SubBanner, "Hold L1 or Backspace restart at checkpoint.");
        }
    }
示例#2
0
    private IEnumerator RewindEndingCountdownUi()
    {
        WorldUIManager.DisplayBanner(WorldUiElement.SubBanner);

        var timeWaitedForResume = 0f;

        while (true)
        {
            // Banner will exit when status changes for any reason
            if (_currentRewindStatus != RewindStatus.SafeFreeze && timeWaitedForResume > 0)
            {
                break;
            }

            var countdown = Math.Round((Rewinder.WaitBeforeResumeTime - timeWaitedForResume), 1);
            countdown = countdown < 0 ? 0 : countdown;
            WorldUIManager.SetBannerText(WorldUiElement.SubBanner, countdown.ToString());
            timeWaitedForResume += Time.deltaTime;

            yield return(null);
        }

        WorldUIManager.HideElement(WorldUiElement.SubBanner);
    }
示例#3
0
 private void UpdateRewindsCountBanner(int rewindsCount)
 {
     WorldUIManager.SetBannerText(WorldUiElement.LeftBanner, $"Rewinds: {rewindsCount}");
 }