示例#1
0
        public void DrawChanges()
        {
            Map.RecalcVisibleRect(_hero.Position);

            _drawer.Clear();
            if (_isKnowledgesShown)
            {
                _drawer.DrawKnowledges();
            }
            else if (_hero.IsHalt())
            {
                SetPaused(true);
                _drawer.DrawHaltScreen(_hero.GetAllKnowledges(), newKnowledges =>
                {
                    _hero.RewriteKnowledges(newKnowledges);
                    SetPaused(false);
                });
            }
            else
            {
                DrawSurface();
            }

            IEnumerable <MenuItems> groupedItems = _hero.GetContainerItems()
                                                   .GroupBy(go => GetDrawingCode(go),
                                                            (id, gos) =>
                                                            new MenuItems
            {
                Name             = $"{GetScreenName(gos.First())}({gos.Count()})",
                Id               = id,
                GetClientActions = GetFuncForClientActions(gos.First())
            });

            _drawer.DrawContainer(groupedItems);

            _drawer.DrawHeroProperties(_hero.GetProperties());

            _drawer.DrawTime(_dayNightCycle.CurrentGameDate);
        }