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:
Disposable
,KryoSerializable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionint
Fields 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
Projectile.Factory<? extends Projectile>
getFactory
(ProjectileType projectileType) void
void
void
register
(Projectile projectile) Добавить снаряд в массив снарядов, которые обрабатываются.void
setup()
Performs the initial configuration of the system.void
update
(float deltaTime) void
Methods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, profileUpdate
Methods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered
-
Field Details
-
projectiles
-
nextProjectileId
public int nextProjectileId -
F
-
-
Constructor Details
-
ProjectileSystem
public ProjectileSystem()
-
-
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
-
getFactory
-
register
Добавить снаряд в массив снарядов, которые обрабатываются. Этот метод регистрирует systemProvider снаряда, поэтому его стоит вызывать сразу после создания снаряда, перед любой его обработкой. -
update
public void update(float deltaTime) - Overrides:
update
in classGameSystem
-
getSystemName
- Specified by:
getSystemName
in classGameSystem
-
draw
-
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
-