Sinespace Client  2023.2.17543
Client-side scripting for Sinespace
SineSpace.Scripting.Player.SProfile Class Reference
Inheritance diagram for SineSpace.Scripting.Player.SProfile:
ScriptClass< T > ScriptClassWrapper< T >

Public Member Functions

override void Initialise (SScript runtime, object wrapper)
 
void Authorize (Closure onAuthorized=null, Closure onRejected=null)
 Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'. More...
 
void Authorize (Action onAuthorized=null, Action onRejected=null)
 Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'. More...
 
void LoadProfile (Action< SUserProfile > onFinished)
 
void LoadProfile (Closure onFinished)
 Load the profile of player More...
 
- Public Member Functions inherited from ScriptClass< T >
void ReportError (string error, bool fatal, UnityEngine.Object target=null)
 
- Public Member Functions inherited from ScriptClassWrapper< T >
override void Initialise (SScript runtime, object wrapper)
 

Public Attributes

SUserProfile ActivePlayerProfile
 

Properties

bool Authorized [get]
 
- Properties inherited from ScriptClass< T >
override bool Alive [get]
 Return if the component is alive. More...
 
virtual bool Alive [get]
 
DynValue CachedData [get, set]
 
- Properties inherited from ScriptClassWrapper< T >
_wrap [get]
 

Additional Inherited Members

- Protected Member Functions inherited from ScriptClass< T >
void Initialise (SScript runtime)
 

Member Function Documentation

◆ Authorize() [1/2]

void SineSpace.Scripting.Player.SProfile.Authorize ( Action  onAuthorized = null,
Action  onRejected = null 
)

Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.

local profile=Space.Profile
function Au()
profile.Authorize()
Space.Log(profile.Authorized)
end
Parameters
onAuthorizedThe onAuthorized c# action.
onRejectedThe onRejected c# action.

◆ Authorize() [2/2]

void SineSpace.Scripting.Player.SProfile.Authorize ( Closure  onAuthorized = null,
Closure  onRejected = null 
)

Requests access to profile functions, must be called prior to attempting to access profile. As soon as the player has accepted the request, the Authorized attribute will be 'true'.

local profile=Space.Profile
Space.Log(profile.Authorized)
Parameters
onAuthorizedThe onAuthorized lua callback.
onRejectedThe onRejected lua callback.

◆ Initialise()

override void SineSpace.Scripting.Player.SProfile.Initialise ( SScript  runtime,
object  wrapper 
)
virtual

Implements ScriptClass< T >.

◆ LoadProfile() [1/2]

void SineSpace.Scripting.Player.SProfile.LoadProfile ( Action< SUserProfile onFinished)

◆ LoadProfile() [2/2]

void SineSpace.Scripting.Player.SProfile.LoadProfile ( Closure  onFinished)

Load the profile of player

local profile=Space.Profile
profile.Authorize()
function Load()
profile.LoadProfile(function ()
local soProfile=profile.ActivePlayerProfile
Space.Log(soProfile.UserName)
end)
end
<br>

Member Data Documentation

◆ ActivePlayerProfile

SUserProfile SineSpace.Scripting.Player.SProfile.ActivePlayerProfile

Property Documentation

◆ Authorized

bool SineSpace.Scripting.Player.SProfile.Authorized
get
SineSpace.Scripting.Player.SProfile.Authorized
bool Authorized
Definition: SProfile.cs:16
SineSpace.Scripting.Player.SProfile.LoadProfile
void LoadProfile(Action< SUserProfile > onFinished)
Definition: SProfile.cs:110
SineSpace.Scripting.Player.SProfile.ActivePlayerProfile
SUserProfile ActivePlayerProfile
Definition: SProfile.cs:18
SineSpace.Scripting.Player.SProfile.Authorize
void Authorize(Closure onAuthorized=null, Closure onRejected=null)
Requests access to profile functions, must be called prior to attempting to access profile....
Definition: SProfile.cs:36