Interface IUpgradeBehaviour<T,O>

All Known Implementing Classes:
UpgradeBehaviour

public interface IUpgradeBehaviour<T,O>
Behaviour for an upgrade in an upgradable instance.
  • Method Details

    • getUpgradeLevel

      int getUpgradeLevel(T upgradable, Upgrades.Upgrade upgrade)
      Parameters:
      upgradable - The upgradable on which the behaviour was defined.
      upgrade - The upgrade.
      Returns:
      The level of upgrade, no level is 0.
    • applyUpgrade

      void applyUpgrade(T upgradable, Upgrades.Upgrade upgrade, int upgradeLevel, IUpgradeSensitiveEvent<O> event)
      Callback for when an event occurs that is sensitive to upgrades.
      Parameters:
      upgradable - The upgradable on which the behaviour was defined.
      upgrade - The upgrade to apply to the event, checks for application to this instance is already done.
      upgradeLevel - The level of upgrade.
      event - The event.