Enfusion Script API
|
Public Member Functions | |
proto native bool | Initialized () |
Return true if storage is initialized - ready to load/ store data. | |
proto native void | ClearScheduler () |
Clear all scheduled operations. | |
proto native void | EnableScheduler (string fileName, bool bEnable) |
Request scheduler On/ Off without being removed from queue. | |
proto native void | RequestPlayerSave (int iPlayerId) |
Request player save. | |
proto native void | RequestScheduledSave (string fileName, float sec) |
Request periodical processing save of session content. | |
proto native void | RequestSave (string fileName) |
Request server to process save of session content (can be invoked from script or game) | |
proto native void | RequestLoad (string fileName) |
Request server to process load of session content (can be invoked from script or game) | |
proto native void | LocalSave (string fileName) |
Request local save of session content (can be invoked from script or game) | |
proto native void | LocalLoad (string fileName) |
Request local load of session content (can be invoked from script or game) | |
proto native void | LocalDelete (string fileName) |
Request local delete of session content (can be invoked from script or game) | |
proto native bool | CheckFileID (string fileName) |
Check if file/ handle with thist name exist - local if you're local - online if you're online. | |
proto native void | AssignFileIDCallback (string fileName, DSSessionCallback sessionCallback) |
Assign callback for handling Save & Load events for specific file handle under session. | |
proto native void | ProcessLoad (JsonApiStruct pDataObject, string fileName) |
Process session load - You call this method from OnLoad() event of callback. | |
proto native void | ProcessSave (JsonApiStruct pDataObject, string fileName) |
Process session save - You call this method from OnSave() event of callback. | |
proto native bool | GetOnlineWritePrivilege () |
Check if online storage privileges are granted (if not - all is stored locally with session) | |
proto native int | AvailableSaves (out notnull array< string > aSaves) |
Get a list of all save files that are ready to load. | |
proto native void SessionStorage.AssignFileIDCallback | ( | string | fileName, |
DSSessionCallback | sessionCallback | ||
) |
Assign callback for handling Save & Load events for specific file handle under session.
fileName | - name of file handle |
sessionCallback | - name of file handle |
Get a list of all save files that are ready to load.
Check if file/ handle with thist name exist - local if you're local - online if you're online.
fileName | - name of file handle |
proto native void SessionStorage.ClearScheduler | ( | ) |
Clear all scheduled operations.
Request scheduler On/ Off without being removed from queue.
fileName | - name of file handle |
bEnable | - if should run or not (Note: by default it run so you typically pause it first) |
proto native bool SessionStorage.GetOnlineWritePrivilege | ( | ) |
Check if online storage privileges are granted (if not - all is stored locally with session)
proto native bool SessionStorage.Initialized | ( | ) |
Return true if storage is initialized - ready to load/ store data.
proto native void SessionStorage.LocalDelete | ( | string | fileName | ) |
Request local delete of session content (can be invoked from script or game)
fileName | - name of file handle |
proto native void SessionStorage.LocalLoad | ( | string | fileName | ) |
Request local load of session content (can be invoked from script or game)
fileName | - name of file handle |
proto native void SessionStorage.LocalSave | ( | string | fileName | ) |
Request local save of session content (can be invoked from script or game)
fileName | - name of file handle |
proto native void SessionStorage.ProcessLoad | ( | JsonApiStruct | pDataObject, |
string | fileName | ||
) |
Process session load - You call this method from OnLoad() event of callback.
pDataObject | Represents "master" object as targer for incoming data |
proto native void SessionStorage.ProcessSave | ( | JsonApiStruct | pDataObject, |
string | fileName | ||
) |
Process session save - You call this method from OnSave() event of callback.
pDataObject | Represents "master" object as source of outcoming data |
proto native void SessionStorage.RequestLoad | ( | string | fileName | ) |
Request server to process load of session content (can be invoked from script or game)
fileName | - name of file handle |
proto native void SessionStorage.RequestPlayerSave | ( | int | iPlayerId | ) |
Request player save.
iPlayerId | Is Player Id used on player identity |
proto native void SessionStorage.RequestSave | ( | string | fileName | ) |
Request server to process save of session content (can be invoked from script or game)
fileName | - name of file handle |
Request periodical processing save of session content.
fileName | - name of file handle |
sec | - time in seconds |