/// <summary>
        ///     Draws army number into the map. TODO: respect to highlighting
        /// </summary>
        /// <param name="region">Region to draw it into.</param>
        /// <param name="army">Army number to draw.</param>
        public void OverDrawArmyNumber(Region region, int army)
        {
            // get color that match the region
            Color?colorOrNull = templateProcessor.GetColor(region);

            if (colorOrNull == null)
            {
                return;
            }
            // source color
            Color sourceColor = colorOrNull.Value;

            // recolor back to the previous color
            if (region.Owner != null)
            {
                coloringHandler.Recolor(sourceColor, Color.FromKnownColor(region.Owner.Color));
            }
            else
            {
                // doesnt have owner => recolor to visible color
                coloringHandler.Recolor(sourceColor, Global.RegionVisibleUnoccupiedColor);
            }

            DrawArmyNumber(region, army);
        }
Beispiel #2
0
        /// <summary>
        /// Seizes specified region for player on turn.
        /// </summary>
        /// <param name="region"></param>
        /// <param name="playerPerspective"></param>
        public void Seize(Region region, Player playerPerspective)
        {
            coloringHandler.Recolor(region, playerPerspective.Color);

            if (!isFogOfWar)
            {
                textDrawingHandler.DrawArmyNumber(region, region.Army);
            }

            OnImageChanged?.Invoke();
        }