Exemplo n.º 1
0
 public void checkTransitions(Player player, ZoneFactory zoneFactory)
 {
     Point startingPoint = new Point(player.getGlobalLocation().X, player.getGlobalLocation().Y);
     int transNum = isTransition(startingPoint, player, zoneFactory.getCurrentZone());
     if (transNum != 0)
     {
         transitionZones(player, zoneFactory, zoneFactory.getCurrentZone().getZoneNumber(), transNum);
     }
 }
Exemplo n.º 2
0
 private void testCaveTransition(Player player, ZoneFactory zoneFactory, int transitionNumber)
 {
     Console.WriteLine(transitionNumber);
     switch (transitionNumber)
     {
         case 1:
             Zone currentZone = zoneFactory.getCurrentZone();
             zoneFactory.setCurrentZone(currentZone.getTransitionZones()[0]);
             player.setGlobalLocation(currentZone.getTransitionPoints()[0].X, currentZone.getTransitionPoints()[0].Y);
             break;
         default:
             break;
     }
 }
Exemplo n.º 3
0
 private void movePlayerUp(Player player, ZoneFactory zoneFactory)
 {
     player.moveGlobalUp(checkUpCollision(player, zoneFactory.getCurrentZone()));
     transitionHandler.checkTransitions(player, zoneFactory);
 }