/// <summary> /// Returns the person in the grid space currently being moused over. /// </summary> /// <param name="screenPos">Selection position on screen</param> /// <returns>Person or Null</returns> public Person personAtScreenPos(Vector2 screenPos) { SimpleGridSpace gs = spaceAtScreenpos(screenPos); if (gs != null && gs.IsOccupied && gs.CurrentActor is Person) { return((Person)gs.CurrentActor); } return(null); }
/// <summary> /// Returns the hero that can be found at the screen position given /// </summary> /// <param name="screenPos">Selection position on screen</param> /// <returns>Hero or Null</returns> public Hero heroAtScreenPos(Vector2 screenPos) { SimpleGridSpace gs = spaceAtScreenpos(screenPos); if (gs.IsOccupied && gs.CurrentActor is Hero) { return((Hero)gs.CurrentActor); } return(null); }