Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | List of all members
SessionStorage Interface Reference

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.
 

Member Function Documentation

◆ AssignFileIDCallback()

proto native void SessionStorage.AssignFileIDCallback ( string  fileName,
DSSessionCallback  sessionCallback 
)

Assign callback for handling Save & Load events for specific file handle under session.

Parameters
fileName- name of file handle
sessionCallback- name of file handle

◆ AvailableSaves()

proto native int SessionStorage.AvailableSaves ( out notnull array< string aSaves)

Get a list of all save files that are ready to load.

◆ CheckFileID()

proto native bool SessionStorage.CheckFileID ( string  fileName)

Check if file/ handle with thist name exist - local if you're local - online if you're online.

Parameters
fileName- name of file handle

◆ ClearScheduler()

proto native void SessionStorage.ClearScheduler ( )

Clear all scheduled operations.

◆ EnableScheduler()

proto native void SessionStorage.EnableScheduler ( string  fileName,
bool  bEnable 
)

Request scheduler On/ Off without being removed from queue.

Parameters
fileName- name of file handle
bEnable- if should run or not (Note: by default it run so you typically pause it first)

◆ GetOnlineWritePrivilege()

proto native bool SessionStorage.GetOnlineWritePrivilege ( )

Check if online storage privileges are granted (if not - all is stored locally with session)

◆ Initialized()

proto native bool SessionStorage.Initialized ( )

Return true if storage is initialized - ready to load/ store data.

◆ LocalDelete()

proto native void SessionStorage.LocalDelete ( string  fileName)

Request local delete of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ LocalLoad()

proto native void SessionStorage.LocalLoad ( string  fileName)

Request local load of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ LocalSave()

proto native void SessionStorage.LocalSave ( string  fileName)

Request local save of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ ProcessLoad()

proto native void SessionStorage.ProcessLoad ( JsonApiStruct  pDataObject,
string  fileName 
)

Process session load - You call this method from OnLoad() event of callback.

Parameters
pDataObjectRepresents "master" object as targer for incoming data

◆ ProcessSave()

proto native void SessionStorage.ProcessSave ( JsonApiStruct  pDataObject,
string  fileName 
)

Process session save - You call this method from OnSave() event of callback.

Parameters
pDataObjectRepresents "master" object as source of outcoming data

◆ RequestLoad()

proto native void SessionStorage.RequestLoad ( string  fileName)

Request server to process load of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ RequestPlayerSave()

proto native void SessionStorage.RequestPlayerSave ( int  iPlayerId)

Request player save.

Parameters
iPlayerIdIs Player Id used on player identity

◆ RequestSave()

proto native void SessionStorage.RequestSave ( string  fileName)

Request server to process save of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ RequestScheduledSave()

proto native void SessionStorage.RequestScheduledSave ( string  fileName,
float  sec 
)

Request periodical processing save of session content.

Parameters
fileName- name of file handle
sec- time in seconds

The documentation for this interface was generated from the following file: