Class GameUpdatableHandler

    • Method Summary

      Modifier and Type Method Description
      void registerEvent​(Updatable updatable)
      Register an updatable by adding it to the group
      void runAllEvents()
      Run all events.
      void unregisterEvent​(Updatable updatable)
      Unregister an updatable by removing it from the group
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • GameUpdatableHandler

        public GameUpdatableHandler()
      • GameUpdatableHandler

        public GameUpdatableHandler​(java.util.Collection<Updatable> eventsList)
    • Method Detail

      • registerEvent

        public void registerEvent​(Updatable updatable)
        Description copied from interface: UpdatableHandler
        Register an updatable by adding it to the group
        Specified by:
        registerEvent in interface UpdatableHandler
        Parameters:
        updatable - the Updatable to be added in the group
      • unregisterEvent

        public void unregisterEvent​(Updatable updatable)
        Description copied from interface: UpdatableHandler
        Unregister an updatable by removing it from the group
        Specified by:
        unregisterEvent in interface UpdatableHandler
        Parameters:
        updatable - the Updatable to be removed from the group