Пример #1
0
        private void DrawHint(Graphics g)
        {
            if (_hintToDisplay == null)
            {
                return;
            }

            if (DateTime.UtcNow > _hintExpiry || !_levelReplayContext.CanShowHint(_hintToDisplay))
            {
                _hintToDisplay = null;
                return;
            }

            DrawMessageInner(g, _hintToDisplay.Message);
        }
Пример #2
0
 public void SuppressHint(Hint hint)
 {
     _levelReplayContext.SuppressHint(hint);
 }
Пример #3
0
 public void DisplayHint(Hint hint)
 {
     _hintToDisplay = hint;
     _hintExpiry    = DateTime.UtcNow + new TimeSpan(0, 0, 4);
 }
Пример #4
0
 public void SuppressHint(Hint hint)
 {
     _hintsSuppressed.Add(hint);
 }
Пример #5
0
 public bool CanShowHint(Hint hint)
 {
     return(!_hintsSuppressed.Contains(hint));
 }