Class ParticleEmitter

    • Constructor Detail

      • ParticleEmitter

        public ParticleEmitter​()
        Initializes with defautl size
      • ParticleEmitter

        public ParticleEmitter​(int size)
        active by default
        Parameters:
        size - size of pool
    • Method Detail

      • spawn

        public AbstractEntity spawn​(Point point)
        Description copied from class: AbstractEntity
        Add this entity to the map-> let it spawn
        Overrides:
        spawn in class AbstractEntity
        Parameters:
        point - the point in the game world where the object is. If it was previously set this is ignored.
        Returns:
        returns itself
      • update

        public void update​(float dt)
        Description copied from class: AbstractEntity
        Updates the logic of the object.
        Overrides:
        update in class AbstractEntity
        Parameters:
        dt - time since last update in game time
      • toggle

        public void toggle​()
      • setActive

        public void setActive​(boolean active)
        Makes the emitter spawn objects
        Parameters:
        active -
      • setPrototype

        public void setPrototype​(Particle prototype)
        Parameters:
        prototype -
      • getPrototype

        public Particle getPrototype​()
        Returns:
      • setParticleStartMovement

        public void setParticleStartMovement​(com.badlogic.gdx.math.Vector3 dir)
        Parameters:
        dir - the direction and speed where the particles leave, in m/s without unit
      • setParticleSpread

        public void setParticleSpread​(com.badlogic.gdx.math.Vector3 spread)
        Spread is applied in both directions.
        Parameters:
        spread - the range in which random noise gets aplied, in m/s without unit
      • setParticleDelay

        public void setParticleDelay​(float timeEachSpawn)
        Parameters:
        timeEachSpawn - time in ms
      • setBrightness

        public void setBrightness​(float brightness)
        If it can emit light.
        Parameters:
        brightness - values > 0 enable the light source. Typicall values 0-100
      • handleMessage

        public boolean handleMessage​(com.badlogic.gdx.ai.msg.Telegram msg)