Package com.prineside.tdi2.systems
Class AbilitySystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.AbilitySystem
- All Implemented Interfaces:
Disposable
,KryoSerializable
-
Field Summary
Modifier and TypeFieldDescriptionint[]
Fields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAbilityCharges
(int idx, int cnt) boolean
void
При повторном нажатии на кнопку навыка (отменить применение)void
dispose()
Releases all resources of this object.void
void
drawBatchAdditive
(Batch batch, float deltaTime) int
int
getAvailableAbilities
(int idx) int
getAvailableAbilitiesByType
(AbilityType abilityType) int
int
getEnergyCost
(AbilityType abilityType) float
int
float
void
Performs the final configuration of the system.void
void
void
registerAndConfigure
(Ability ability, int x, int y, double mdps) registerConfigureAndStartAbility
(AbilityType abilityType, int x, int y, double mdps) void
setup()
Performs the initial configuration of the system.startAbility
(Ability ability) void
startUsingAbility
(AbilityType abilityType) При нажатии на кнопку навыкаvoid
update
(float deltaTime) void
Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, profileUpdate
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
activeAbilities
-
abilitiesConfiguration
-
abilitiesUsed
public int[] abilitiesUsed
-
-
Constructor Details
-
AbilitySystem
public AbilitySystem()
-
-
Method Details
-
write
- Specified by:
write
in interfaceKryoSerializable
- Overrides:
write
in classRegistrable
-
read
- Specified by:
read
in interfaceKryoSerializable
- Overrides:
read
in classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameState
in classGameSystem
-
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 classGameSystem
-
postStateRestore
public void postStateRestore()- Overrides:
postStateRestore
in classGameSystem
-
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 classGameSystem
-
getAbilitySlotCount
public int getAbilitySlotCount() -
getUiCurrentlyUsingAbility
- Returns:
- null, если не выделена
-
startUsingAbility
При нажатии на кнопку навыка -
cancelUsingAbility
public void cancelUsingAbility()При повторном нажатии на кнопку навыка (отменить применение) -
getEnergy
public int getEnergy() -
getNextEnergyGenerationTime
public float getNextEnergyGenerationTime() -
getAvailableAbilitiesByType
-
getAvailableAbilities
public int getAvailableAbilities(int idx) -
addAbilityCharges
public void addAbilityCharges(int idx, int cnt) -
registerConfigureAndStartAbility
-
startAbility
-
registerAndConfigure
-
getEnergyCost
-
update
public void update(float deltaTime) - Overrides:
update
in classGameSystem
-
getSystemName
- Specified by:
getSystemName
in classGameSystem
-
getMaxEnergy
public int getMaxEnergy() -
getEnergyRegenerationTime
public float getEnergyRegenerationTime() -
draw
-
drawBatchAdditive
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.Disposable
Releases all resources of this object.- Specified by:
dispose
in interfaceDisposable
- Overrides:
dispose
in classGameSystem
-