Class ParticleSetUpdaterTask

java.lang.Object
gaiasky.scene.task.ParticleSetUpdaterTask
All Implemented Interfaces:
IObserver, Runnable

public class ParticleSetUpdaterTask extends Object implements Runnable, IObserver
  • Field Details

    • UPDATE_INTERVAL_MS

      protected static final double UPDATE_INTERVAL_MS
      See Also:
    • UPDATE_INTERVAL_MS_2

      protected static final double UPDATE_INTERVAL_MS_2
      See Also:
    • CAM_DX_TH

      protected static final double CAM_DX_TH
    • CAM_DX_TH_SQ

      protected static final double CAM_DX_TH_SQ
  • Constructor Details

    • ParticleSetUpdaterTask

      public ParticleSetUpdaterTask(com.badlogic.ashley.core.Entity entity, ParticleSet particleSet, StarSet starSet)
  • Method Details

    • update

      public void update(ICamera camera)
      Triggers the update task if the requirements for it are met:
      • Set is not updating.
      • Opacity is not 0.
      • Time since last update is not larger than updateInterval*2.
      • The camera has moved a lot.
      • Time is on and very fast.
      Parameters:
      camera - The camera.
    • run

      public void run()
      Specified by:
      run in interface Runnable
    • notify

      public void notify(Event event, Object source, Object... data)
      Description copied from interface: IObserver
      Event notification call.
      Specified by:
      notify in interface IObserver
      Parameters:
      event - The event type.
      source - The source object, if any.
      data - The data associated with this event.
    • dispose

      public void dispose()