Exemple #1
0
        /// <summary>
        /// Creates a FOVVisibilityHandler that will manage visibility of objects for the given map.
        /// </summary>
        /// <param name="map">The map this handler will manage visibility for.</param>
        /// <param name="startingState">The starting state to put the handler in.</param>
        public FOVVisibilityHandler(BasicMap map, State startingState = State.Enabled)
        {
            Map = map;

            map.DrawingComponentsHandleVisibility = false;

            map.ObjectAdded     += Map_ObjectAdded;
            map.ObjectMoved     += Map_ObjectMoved;
            map.FOVRecalculated += Map_FOVRecalculated;

            SetState(startingState);
        }
Exemple #2
0
 /// <summary>
 /// Creates a GameFrameManager that runs logic frames for the given map.
 /// </summary>
 /// <param name="map">The map to run logic frames for.</param>
 public GameFrameManager(BasicMap map) => Map = map;
 /// <summary>
 /// Creates a DefaultFOVVisibilityHandler that will manage visibility of objects for the given map as noted in the class description.
 /// </summary>
 /// <param name="map">The map this handler will manage visibility for.</param>
 /// <param name="unexploredColor">Foreground color to set to all terrain tiles that are outside of FOV but have been explored.</param>
 /// <param name="startingState">The starting state to put the handler in.</param>
 public DefaultFOVVisibilityHandler(BasicMap map, Color unexploredColor, State startingState = State.Enabled)
     : base(map, startingState) => ExploredColor = unexploredColor;