Class CycleGenerator

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

public class CycleGenerator extends DoubleGenerator
A generator that moves between two NumProviders in one direction over a given period, where it takes period calls to DoubleGenerator.refresh() to go form start to end
  • Constructor Details

    • CycleGenerator

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

      public CycleGenerator(double start, double end, double period, double initialProgress)
      Parameters:
      start - The starting value of the cycle
      end - The end value of the cycle
      period - The amount of steps needed to go from start to end
      initialProgress - The initial progress from 0 to 1, where 0 is start, and 1 is end.
    • CycleGenerator

      public CycleGenerator(NumProvider start, NumProvider end, NumProvider period, double initialProgress)
      Parameters:
      start - The starting value of the cycle
      end - The end value of the cycle
      period - The amount of steps needed to go from start to end
      initialProgress - The initial progress from 0 to 1, where 0 is start, and 1 is end.
    • CycleGenerator

      public CycleGenerator(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