Package com.prineside.tdi2.systems
Class ProjectileSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.ProjectileSystem
- 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
dispose()
Releases all resources of this object.void
draw
(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float interpolationTime) void
read
(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input) void
register
(Projectile projectile) Добавить снаряд в массив снарядов, которые обрабатываются.void
setup()
Произвести начальную настройку системы.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, postSetup, postStateRestore, profileUpdate
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
projectiles
-
nextProjectileId
public int nextProjectileId -
scheduledUpdater
-
listeners
-
-
Constructor Details
-
ProjectileSystem
public ProjectileSystem()
-
-
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
-
register
Добавить снаряд в массив снарядов, которые обрабатываются. Этот метод регистрирует systemProvider снаряда, поэтому его стоит вызывать сразу после создания снаряда, перед любой его обработкой. -
update
public void update(float deltaTime) - Overrides:
update
in classGameSystem
-
getSystemName
- Specified by:
getSystemName
in classGameSystem
-
draw
public void draw(com.badlogic.gdx.graphics.g2d.Batch batch, float deltaTime, float interpolationTime) -
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
-