Package com.prineside.tdi2.managers
Class ReplayManager
java.lang.Object
com.prineside.tdi2.Manager.ManagerAdapter
com.prineside.tdi2.managers.ReplayManager
- All Implemented Interfaces:
com.badlogic.gdx.utils.Disposable,Manager
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic classstatic classstatic classNested classes/interfaces inherited from interface com.prineside.tdi2.Manager
Manager.ManagerAdapter, Manager.ManagerWithListeners<T> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcom.badlogic.gdx.utils.Array<String>voidstatic voidsaveReplay(GameSystemProvider S, byte[] preferencesSnapshot, boolean saveState) voidsendReplayToServer(String replayId, ObjectRetriever<ReplayManager.ReplaySendStatus> cb) voidОтправить все ранее неотправленные реплеи на сервер и добавить их в список отправленных в случае удачи.voidsetup()Вызывается, когда объекты всех менеджеров созданы и можно к ним обращатьсяMethods inherited from class com.prineside.tdi2.Manager.ManagerAdapter
clearPools, dispose, postRender, preRender, test
-
Field Details
-
helperOutput
-
-
Constructor Details
-
ReplayManager
public ReplayManager()
-
-
Method Details
-
setup
public void setup()Description copied from interface:ManagerВызывается, когда объекты всех менеджеров созданы и можно к ним обращаться- Specified by:
setupin interfaceManager- Overrides:
setupin classManager.ManagerAdapter
-
deleteAllReplays
public void deleteAllReplays() -
loadAndStoreBestReplayFromServer
public void loadAndStoreBestReplayFromServer(String levelName, ObjectRetriever<ReplayManager.ReplayRecord> cb) - Parameters:
cb- returns best replay or null if there are any
-
saveReplay
- Returns:
- replay ID
-
sendReplayToServer
-
getRecord
- Returns:
- ReplayRecord или null, если такой записи нет или она не парсится
-
getAllRecordIds
-
sendUnsentReplaysToTheServer
public void sendUnsentReplaysToTheServer()Отправить все ранее неотправленные реплеи на сервер и добавить их в список отправленных в случае удачи. Всем отправленным реплеям, кроме последних 5, будут удалены детальные данные для экономии места. -
main
-