Class AbilitySystem

All Implemented Interfaces:
Disposable, KryoSerializable

public final class AbilitySystem extends GameSystem
  • Field Details

  • Constructor Details

    • AbilitySystem

      public AbilitySystem()
  • Method Details

    • write

      public void write(Kryo kryo, Output output)
      Specified by:
      write in interface KryoSerializable
      Overrides:
      write in class Registrable
    • read

      public void read(Kryo kryo, Input input)
      Specified by:
      read in interface KryoSerializable
      Overrides:
      read in class Registrable
    • affectsGameState

      public boolean affectsGameState()
      Specified by:
      affectsGameState in class GameSystem
    • setup

      public void setup()
      Description copied from class: GameSystem
      Performs the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.
      Overrides:
      setup in class GameSystem
    • postStateRestore

      public void postStateRestore()
      Overrides:
      postStateRestore in class GameSystem
    • postSetup

      public void postSetup()
      Description copied from class: GameSystem
      Performs the final configuration of the system. At the moment of call, all systems are already loaded and setup(), all listeners are already added.
      Overrides:
      postSetup in class GameSystem
    • getAbilitySlotCount

      public int getAbilitySlotCount()
    • getUiCurrentlyUsingAbility

      public AbilityType getUiCurrentlyUsingAbility()
      Returns:
      null, если не выделена
    • startUsingAbility

      public void startUsingAbility(AbilityType abilityType)
      При нажатии на кнопку навыка
    • cancelUsingAbility

      public void cancelUsingAbility()
      При повторном нажатии на кнопку навыка (отменить применение)
    • getEnergy

      public int getEnergy()
    • getNextEnergyGenerationTime

      public float getNextEnergyGenerationTime()
    • getAvailableAbilitiesByType

      public int getAvailableAbilitiesByType(AbilityType abilityType)
    • getAvailableAbilities

      public int getAvailableAbilities(int idx)
    • addAbilityCharges

      public void addAbilityCharges(int idx, int cnt)
    • registerConfigureAndStartAbility

      public Ability registerConfigureAndStartAbility(AbilityType abilityType, int x, int y, double mdps)
    • startAbility

      public Ability startAbility(Ability ability)
    • registerAndConfigure

      public void registerAndConfigure(Ability ability, int x, int y, double mdps)
    • getEnergyCost

      public int getEnergyCost(AbilityType abilityType)
    • update

      public void update(float deltaTime)
      Overrides:
      update in class GameSystem
    • getSystemName

      public String getSystemName()
      Specified by:
      getSystemName in class GameSystem
    • getMaxEnergy

      public int getMaxEnergy()
    • getEnergyRegenerationTime

      public float getEnergyRegenerationTime()
    • draw

      public void draw(Batch batch, float deltaTime)
    • drawBatchAdditive

      public void drawBatchAdditive(Batch batch, float deltaTime)
    • dispose

      public void dispose()
      Description copied from interface: com.badlogic.gdx.utils.Disposable
      Releases all resources of this object.
      Specified by:
      dispose in interface Disposable
      Overrides:
      dispose in class GameSystem