Class Particle

    • Constructor Detail

      • Particle

        public Particle​()
        With TTL 2000.
      • Particle

        public Particle​(byte id)
        With TTL 2000
        Parameters:
        id -
      • Particle

        public Particle​(byte id,
                        float maxtime)
        Parameters:
        id -
        maxtime - TTL in ms
    • Method Detail

      • init

        public void init​(float maxtime)
        Parameters:
        maxtime -
      • setType

        public void setType​(ParticleType type)
        Parameters:
        type -
      • setColor

        public void setColor​(com.badlogic.gdx.graphics.Color color)
        Description copied from class: AbstractGameObject
        Give the object a tint. The default brightness is RGBA 0x808080FF so you can make it brighter and darker by modifying R, G and B.
        Overrides:
        setColor in class AbstractGameObject
        Parameters:
        color - refence is kept
      • setTTL

        public void setTTL​(float time)
        Time to live for each particle. Resets timer.
        Parameters:
        time - in ms
      • update

        public void update​(float dt)
        Description copied from class: MovableEntity
        Updates the character. Applies gravitation.
        Overrides:
        update in class MovableEntity
        Parameters:
        dt - time since last update in ms
      • getPercentageOfLife

        public float getPercentageOfLife​()
        Returns:
      • getLivingTime

        public float getLivingTime​()
        the amount of time the object lives maximum.
        Returns: