Beispiel #1
0
        protected override bool HasUpdate(uint gameTick)
        {
            if (_cityHeader.Update(gameTick))
            {
                _update = true;
            }
            if (_cityResources.Update(gameTick))
            {
                _update = true;
            }
            if (_cityUnits.Update(gameTick))
            {
                _update = true;
            }
            if (_cityMap.Update(gameTick))
            {
                _update = true;
            }
            if (_cityBuildings.Update(gameTick))
            {
                _update = true;
            }
            if (_cityFoodStorage.Update(gameTick))
            {
                _update = true;
            }
            if (_cityInfo.Update(gameTick))
            {
                _update = true;
            }
            if (_cityProduction.Update(gameTick))
            {
                _update = true;
            }

            if (_update)
            {
                DrawLayer(_cityHeader, gameTick, 2, 1);
                DrawLayer(_cityResources, gameTick, 2, 23);
                DrawLayer(_cityUnits, gameTick, 2, 67);
                DrawLayer(_cityMap, gameTick, 127 + ExtraLeft, 23);
                DrawLayer(_cityBuildings, gameTick, 211 + ExtraLeft, 1);
                DrawLayer(_cityFoodStorage, gameTick, 2, 106);
                DrawLayer(_cityInfo, gameTick, 95 + ExtraLeft, 106);
                DrawLayer(_cityProduction, gameTick, 230 + ExtraLeft, 99);

                DrawButton("Rename", 9, 1, 231 + ExtraLeft, (Height - 10), 42);
                DrawButton("Exit", 12, 4, (Width - 36), (Height - 10), 33);

                _update = false;
                return(true);
            }
            return(false);
        }
Beispiel #2
0
 private void BuildingUpdate(object sender, EventArgs args)
 {
     _cityFoodStorage.Update();
     _cityHeader.Update();
     _cityMap.Update();
     _cityProduction.Update();
 }