Ejemplo n.º 1
0
 /// <summary>
 /// Copy constructor
 /// </summary>
 /// <param name="compass"></param>
 public Compass(Compass compass)
 {
     Direction = compass.Direction;
 }
Ejemplo n.º 2
0
		/// <summary>
		/// Checks if a point is visible from another point
		/// ie: is a monster visible from the current point of view of the team ?
		/// </summary>
		/// <param name="from">The point of view</param>
		/// <param name="to">The destination point to check</param>
		/// <param name="dir">The direction to look</param>
		/// <param name="distance">See distance</param>
		/// <returns>true if visible, false if not visible</returns>
		public bool IsVisible(Point from, Point to, Compass dir, int distance)
		{

			return false;
		}
Ejemplo n.º 3
0
 /// <summary>
 /// Gets a list of items
 /// </summary>
 /// <param name="from">View point</param>
 /// <param name="side">Wall side</param>
 /// <returns>List of items</returns>
 public List <Item> GetItemsFromSide(CardinalPoint from, CardinalPoint side)
 {
     return(GetItemsFromSide(Compass.GetDirectionFromView(from, side)));
 }
Ejemplo n.º 4
0
 /// <summary>
 /// Gets the decoration id of a wall side
 /// </summary>
 /// <param name="from">Facing direction</param>
 /// <param name="side">Wall side</param>
 /// <returns>Decoration id or -1 if no decoration</returns>
 public int GetDecorationId(CardinalPoint from, CardinalPoint side)
 {
     // Get desired side
     return(Decorations[(int)Compass.GetDirectionFromView(from, side)]);
 }
Ejemplo n.º 5
0
        /// <summary>
        /// A hero interacted with a side of the block
        /// </summary>
        /// <param name="location">Location of the mouse</param>
        /// <param name="side">Wall side</param>
        /// <param name="button">Mouse buttons</param>
        /// <returns>True if the event is processed</returns>
        public bool OnClick(Point location, CardinalPoint side, MouseButtons button)
        {
            // Actor interaction
            if (Actor != null)
            {
                return(Actor.OnClick(location, side, button));
            }


            // Decoration interaction
            Team       team       = GameScreen.Team;
            Decoration decoration = team.Maze.GetDecoration(team.FrontLocation.Coordinate, Compass.GetOppositeDirection(team.Direction));

            if (decoration != null)
            {
                GameMessage.AddMessage("Decoration: OnClick()");

                return(false);
            }



            return(false);
        }
Ejemplo n.º 6
0
		/// <summary>
		/// Copy constructor
		/// </summary>
		/// <param name="compass"></param>
		public Compass(Compass compass)
		{
			Direction = compass.Direction;
		}