Class PingPongGenerator

java.lang.Object
wbs.utils.util.providers.generator.num.DoubleGenerator
wbs.utils.util.providers.generator.num.PingPongGenerator
All Implemented Interfaces:
Provider, Refreshable

public class PingPongGenerator extends DoubleGenerator
A generator that moves between two NumProviders over a given period, where it takes period calls to DoubleGenerator.refresh() to go from min to max, and then goes back from max to min over another period
  • Constructor Details

    • PingPongGenerator

      public PingPongGenerator(PingPongGenerator clone)
      Clone constructor.
      Parameters:
      clone - The object to clone from.
    • PingPongGenerator

      public PingPongGenerator(double min, double max, double period, double initialProgress)
    • PingPongGenerator

      public PingPongGenerator(NumProvider min, NumProvider max, NumProvider period, double initialProgress)
    • PingPongGenerator

      public PingPongGenerator(org.bukkit.configuration.ConfigurationSection section, WbsSettings settings, String directory)
      Create this generator from a ConfigurationSection, logging errors in the given settings
      Parameters:
      section - The section where this generator is defined
      settings - The settings to log errors against
      directory - The path taken through the config to get to this point, for logging purposes
  • Method Details