Class ParticleSpawnerOption

java.lang.Object
rekit.logic.gameelements.particles.ParticleSpawnerOption

@ClassParser(ParticleSpawnerOptionParser.class) public class ParticleSpawnerOption extends Object
Represents an option for a ProgressDependency. A ProgressDependency requires a start and an end value. With the ParticleSpawnerOption these can be randomly generated multiple times. Given a minimum and a maximum value for each start and delta (startMin, startMax, deltaMin, deltaMax) the method randomizeProgressDependency() will return the ProgressDependency with random start and end values accordingly. Note: the delta value will be added to the start value to calculate the end value. So if variation in negative direction is desired you must supply a negative delta.
Author:
Angelo Aracri
  • Constructor Summary

    Constructors
    Constructor
    Description
    ParticleSpawnerOption(float value)
    Short-hand constructor that takes argument value and uses it as the start value and sets delta to 0 for no randomized variation and no change of the ProgressDependencies value.
    ParticleSpawnerOption(float start, float delta)
    Short-hand constructor that takes arguments start and delta values for no randomized variation.
    ParticleSpawnerOption(float startMin, float startMax, float deltaMin, float deltaMax)
    Constructor that takes arguments for lower and upper start and delta values for full randomized variation.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns a randomized ProgressDependency with start and end values randomly generated according to specified options (startMin, startMax, deltaMin, deltaMax).

    Methods inherited from class java.lang.Object

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

    • ParticleSpawnerOption

      public ParticleSpawnerOption(float startMin, float startMax, float deltaMin, float deltaMax)
      Constructor that takes arguments for lower and upper start and delta values for full randomized variation.
      Parameters:
      startMin - the minimal value for the ProgressDependencies start value
      startMax - the maximum value for the ProgressDependencies start value
      deltaMin - the minimal value for delta that will be used for the ProgressDependencies end value
      deltaMax - the maximal value for delta that will be used for the ProgressDependencies end value
    • ParticleSpawnerOption

      public ParticleSpawnerOption(float start, float delta)
      Short-hand constructor that takes arguments start and delta values for no randomized variation.
      Parameters:
      start - the value for the ProgressDependencies start value
      delta - the value for delta that will be used for the ProgressDependencies end value
    • ParticleSpawnerOption

      public ParticleSpawnerOption(float value)
      Short-hand constructor that takes argument value and uses it as the start value and sets delta to 0 for no randomized variation and no change of the ProgressDependencies value.
      Parameters:
      value - the value for the ProgressDependencies start value
  • Method Details

    • randomize

      public Progress randomize()
      Returns a randomized ProgressDependency with start and end values randomly generated according to specified options (startMin, startMax, deltaMin, deltaMax).
      Returns:
      the randomized ProgressDependency