Class AnimatedBlock

    • Constructor Detail

      • AnimatedBlock

        public AnimatedBlock​(byte id,
                             byte value,
                             int[] animationsinformation,
                             boolean autostart,
                             boolean loop)
        Create this RenderCell with an array wich has the time of every animation step in ms in it.
        id -
        value -
        animationsinformation - an array wich has the duraion of every animationstep inside
        autostart - True when it should automatically start.
        loop - Set to true when it should loop, when false it stops after one time.
    • Method Detail

      • setBounce

        public void setBounce​(boolean bob)
        play the animation back and forth
        bob -
      • update

        public void update​(float dt)
        updates the block and the animation.
        update in class RenderCell
        dt - the time wich has passed since last update
      • start

        public void start​()
        Starts the animation.
        Specified by:
        start in interface Animatable
      • stop

        public void stop​()
        Stops the animation.
        Specified by:
        stop in interface Animatable