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 TypeFieldDescriptionintFields inherited from class com.prineside.tdi2.Registrable
S -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanvoiddispose()Releases all resources of this object.voidProjectile.Factory<? extends Projectile>getFactory(ProjectileType projectileType) voidvoidvoidregister(Projectile projectile) Добавить снаряд в массив снарядов, которые обрабатываются.voidsetup()Performs the initial configuration of the system.voidupdate(float deltaTime) voidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, profileUpdateMethods 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:
writein interfaceKryoSerializable- Overrides:
writein classRegistrable
-
read
- Specified by:
readin interfaceKryoSerializable- Overrides:
readin classRegistrable
-
affectsGameState
public boolean affectsGameState()- Specified by:
affectsGameStatein classGameSystem
-
setup
public void setup()Description copied from class:GameSystemPerforms the initial configuration of the system. At the moment of call, systemProvider already contains all objects of systems.- Overrides:
setupin classGameSystem
-
postStateRestore
public void postStateRestore()- Overrides:
postStateRestorein classGameSystem
-
getFactory
-
register
Добавить снаряд в массив снарядов, которые обрабатываются. Этот метод регистрирует systemProvider снаряда, поэтому его стоит вызывать сразу после создания снаряда, перед любой его обработкой. -
update
public void update(float deltaTime) - Overrides:
updatein classGameSystem
-
getSystemName
- Specified by:
getSystemNamein classGameSystem
-
draw
-
dispose
public void dispose()Description copied from interface:com.badlogic.gdx.utils.DisposableReleases all resources of this object.- Specified by:
disposein interfaceDisposable- Overrides:
disposein classGameSystem
-