Package com.prineside.tdi2.systems
Class StateSystem
java.lang.Object
com.prineside.tdi2.Registrable
com.prineside.tdi2.GameSystem
com.prineside.tdi2.systems.StateSystem
- All Implemented Interfaces:
 Disposable,KryoSerializable
- Direct Known Subclasses:
 GameStateSystem
- 
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class - 
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanIf this flag is set to false, many state-affecting methods will throw an exception on call to prevent desync.longbooleanintbooleanFields inherited from class com.prineside.tdi2.Registrable
S - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanvoidВызывать для защиты от изменения геймплея не во время updatevoiddispose()Releases all resources of this object.intbooleanvoidpushAction(Action action, int updateNumber) voidpushActionNextUpdate(Action action) voidvoidvoidstartFastForwarding(int toUpdateNumber) voidvoidMethods inherited from class com.prineside.tdi2.GameSystem
getFastStateHash, postSetup, postStateRestore, profileUpdate, setup, updateMethods inherited from class com.prineside.tdi2.Registrable
isRegistered, setRegistered, setUnregistered 
- 
Field Details
- 
updateRequired
public boolean updateRequired - 
replayRecord
 - 
duplicateActionsTo
 - 
inUpdateStage
public boolean inUpdateStageIf this flag is set to false, many state-affecting methods will throw an exception on call to prevent desync. Only set it to true before manipulating the state if you are sure it will not cause desync / full sync is not needed. This flag is set to true at the start of each frame update and gets reset to false at the end, to make sure all changes to the state are caused by state-affecting code and not something like UI events. - 
updateNumber
public int updateNumber - 
replayMode
public boolean replayMode - 
replayFrameCount
public long replayFrameCount 
 - 
 - 
Constructor Details
- 
StateSystem
public StateSystem() 
 - 
 - 
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
 - 
getSystemName
- Specified by:
 getSystemNamein classGameSystem
 - 
isFastForwarding
public boolean isFastForwarding() - 
getFastForwardUpdateNumber
public int getFastForwardUpdateNumber() - 
startFastForwarding
public void startFastForwarding(int toUpdateNumber)  - 
stopFastForwarding
public void stopFastForwarding() - 
checkGameplayUpdateAllowed
public void checkGameplayUpdateAllowed()Вызывать для защиты от изменения геймплея не во время update - 
canSkipMediaUpdate
public boolean canSkipMediaUpdate() - 
pushActionNextUpdate
 - 
pushAction
 - 
requireUpdate
public void requireUpdate() - 
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
 - 
getCurrentUpdateActions
- Returns:
 - массив действий или null
 
 
 -