Пример #1
0
 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);
         }
     }
 }
Пример #2
0
 public void RegisterEntity(WorldEntity toRegister, Point newLocation)
 {
     tileMap[newLocation.X, newLocation.Y].Occupant = toRegister;
 }