private void InteractWithEntityOnSpace(Point relativeLocation) { if (gameWorld.IsOnMap(relativeLocation) && gameWorld.IsOccupied(relativeLocation)) { WorldEntity thingToInteractWith = gameWorld.GetEntityAtLocation(relativeLocation); if (thingToInteractWith is IInteractable && thisEntity is Character) { ((IInteractable)thingToInteractWith).Interact((Character)this.thisEntity); } } }
public void RegisterEntity(WorldEntity toRegister, Point newLocation) { tileMap[newLocation.X, newLocation.Y].Occupant = toRegister; }