public void Push(IVisibleElement element)
        {
            if (history.Count > 0)
            {
                history.Last().IsVisible = false;
            }

            history.Add(element);
            history.Last().IsVisible = true;

            LevelChanged.Invoke();
        }
        public void Replace(IVisibleElement element)
        {
            if (history.Count > 0)
            {
                history.Last().IsVisible = false;
                history.RemoveAt(history.Count - 1);
            }

            history.Add(element);
            history.Last().IsVisible = true;

            LevelChanged.Invoke();
        }
 private void OnLevelChanged()
 {
     VisibleElement = LevelHandler.Instance.Top;
 }