You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

29 line
787 B

  1. package events;
  2. import com.fasterxml.jackson.databind.JsonNode;
  3. import akka.actor.ActorRef;
  4. import structures.GameState;
  5. /**
  6. * In the user’s browser, the game is running in an infinite loop, where there is around a 1 second delay
  7. * between each loop. Its during each loop that the UI acts on the commands that have been sent to it. A
  8. * heartbeat event is fired at the end of each loop iteration. As with all events this is received by the Game
  9. * Actor, which you can use to trigger game logic.
  10. *
  11. * {
  12. * String messageType = “heartbeat”
  13. * }
  14. *
  15. * @author Dr. Richard McCreadie
  16. *
  17. */
  18. public class Heartbeat implements EventProcessor{
  19. @Override
  20. public void processEvent(ActorRef out, GameState gameState, JsonNode message) {
  21. }
  22. }