Class ClockTickTimer


  • public class ClockTickTimer
    extends ch.sahits.game.openpatrician.utilities.service.Timer
    This clock ticking timer extends the pausable timer.
    Author:
    Andi Hotz, (c) Sahits GmbH, 2015 Created on Sep 07, 2015
    • Field Summary

      • Fields inherited from class ch.sahits.game.openpatrician.utilities.service.Timer

        DURATION_INFINITY
    • Constructor Summary

      Constructors 
      Constructor Description
      ClockTickTimer​(long interval, long duration)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void handlePause​(ch.sahits.game.event.data.PauseGame event)  
      void handleResume​(ch.sahits.game.event.data.ResumeGame event)  
      protected void onFinish()  
      protected void onTick()  
      void tick()
      Update the time by one tick.
      • Methods inherited from class ch.sahits.game.openpatrician.utilities.service.Timer

        cancel, getElapsedTime, getRemainingTime, isRunning, pause, resume, setInterval, start
      • Methods inherited from class java.lang.Object

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

      • ClockTickTimer

        public ClockTickTimer​(long interval,
                              long duration)
    • Method Detail

      • onTick

        protected void onTick()
        Specified by:
        onTick in class ch.sahits.game.openpatrician.utilities.service.Timer
      • onFinish

        protected void onFinish()
        Specified by:
        onFinish in class ch.sahits.game.openpatrician.utilities.service.Timer
      • tick

        public void tick()
        Update the time by one tick.
      • handlePause

        public void handlePause​(ch.sahits.game.event.data.PauseGame event)
      • handleResume

        public void handleResume​(ch.sahits.game.event.data.ResumeGame event)