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:
com.badlogic.gdx.utils.Disposable
,com.esotericsoftware.kryo.KryoSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class com.prineside.tdi2.Registrable
S
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
При повторном нажатии на кнопку навыка (отменить применение)void
dispose()
Releases all resources of this object.void
draw
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime) void
drawBatchAdditive
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime) int
getAvailableAbilities
(int idx) int
int
getEnergyCost
(AbilityType abilityType) float
int
float
void
Произвести окончательную настройку системы.void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
setup()
Произвести начальную настройку системы.startAbility
(AbilityType abilityType, int x, int y) void
startUsingAbility
(AbilityType abilityType) При нажатии на кнопку навыкаvoid
update
(float deltaTime) void
write
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postStateRestore, profileUpdate
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
activeAbilities
-
abilitiesConfiguration
-
abilitiesUsed
public int[] abilitiesUsed -
listeners
-
-
Constructor Details
-
AbilitySystem
public AbilitySystem()
-
-
Method Details
-
write
public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output) - Specified by:
write
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
write
in classRegistrable
-
read
public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) - Specified by:
read
in interfacecom.esotericsoftware.kryo.KryoSerializable
- Overrides:
read
in classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameState
in classGameSystem
-
setup
public void setup()Description copied from class:GameSystem
Произвести начальную настройку системы. На момент вызова этого метода, systemProvider содержит объекты всех систем.- Overrides:
setup
in classGameSystem
-
postSetup
public void postSetup()Description copied from class:GameSystem
Произвести окончательную настройку системы. Во время вызова, все системы загружены и установлены (setup()), все слушатели добавлены- Overrides:
postSetup
in classGameSystem
-
getUiCurrentlyUsingAbility
- Returns:
- null, если не выделена
-
startUsingAbility
При нажатии на кнопку навыка -
cancelUsingAbility
public void cancelUsingAbility()При повторном нажатии на кнопку навыка (отменить применение) -
getEnergy
public int getEnergy() -
getNextEnergyGenerationTime
public float getNextEnergyGenerationTime() -
getAvailableAbilities
public int getAvailableAbilities(int idx) -
startAbility
-
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
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime) -
drawBatchAdditive
public void drawBatchAdditive(com.badlogic.gdx.graphics.g2d.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 interfacecom.badlogic.gdx.utils.Disposable
- Overrides:
dispose
in classGameSystem
-