Combu  2.1.14
Unity API Documentation
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | Properties | List of all members
Combu.CombuManager Class Reference

Combu Manager class, it follows the Singleton pattern design (accessible through the 'instance' static property), it means that you shouldn't have more than one instance of this component in your scene. More...

Inheritance diagram for Combu.CombuManager:

Public Member Functions

void CallWebservice (string url, WWWForm form, System.Action< string, string > onComplete)
 Calls a webservice. More...
 
void CancelRequest ()
 Cancels the current request (next frame). More...
 
WWWForm CreateForm (User user=null)
 Creates a new form to be passed to a webservice. More...
 
string GetUrl (string relativeUrl)
 Gets the absolute URL from a relative. More...
 
void GetServerInfo (Action< bool, CombuServerInfo > callback)
 Gets the server info. More...
 
void Ping (bool onlyIfAuthenticated=true, Action< bool > callback=null)
 Ping the server. More...
 

Static Public Member Functions

static byte[] CaptureScreenshot (int thumbnailHeight=720, List< Camera > excludeCams=null)
 Captures the screen shot. More...
 
static string EncryptMD5 (string inputString)
 Encrypts a string in MD5. More...
 
static string EncryptSHA1 (string inputString)
 Encrypts a string in SHA1. More...
 

Public Attributes

const string COMBU_VERSION = "2.1.14"
 Current API version. More...
 
bool dontDestroyOnLoad = true
 Should call DontDestroyOnLoad on the CombuManager gameObject? Recommended: set to true More...
 
bool setAsDefaultSocialPlatform
 Should set Combu as the active social platform? The previous platform is accessible from defaultSocialPlatform More...
 
string secretKey
 The secret key: it must match the define SECRET_KEY configured on the web. More...
 
string urlRootProduction
 The URL root for the production environment. More...
 
string urlRootStage
 The URL root for the stage environment. More...
 
bool useStage
 If true sets the stage as current environment (default: false for production). More...
 
bool logDebugInfo
 Print debug info in the console log. More...
 
float pingIntervalSeconds = 30f
 The ping interval in seconds (set 0 to disable automatic pings). Ping is currently used to mantain the online state of the local user and is automatically called only is the local user is authenticated. More...
 
int onlineSeconds = 120
 The max seconds from now to a user's lastSeen to consider the online state. More...
 
int playingSeconds = 120
 The max seconds from now to a user's lastSeen to consider the playing state. More...
 
string timezone
 Can be used to filter the current system date timezone (the value must be valid in PHP: http://www.php.net/manual/en/timezones.php). More...
 
GameObject achievementUIObject
 The achievement user interface object for CombuPlatform.ShowAchievementsUI(). More...
 
string achievementUIFunction
 The achievement user interface function for CombuPlatform.ShowAchievementsUI(). More...
 
GameObject leaderboardUIObject
 The leaderboard user interface object for CombuPlatform.ShowLeaderboardUI(). More...
 
string leaderboardUIFunction
 The leaderboard user interface function for CombuPlatform.ShowLeaderboardUI(). More...
 

Protected Member Functions

virtual void Awake ()
 
IEnumerator DownloadUrl (string url, WWWForm form, Action< string, string > onComplete)
 Cancels all the current requests (immediately). More...
 
void SecureRequest (WWWForm form)
 Secure the WWWForm by signing the request. More...
 

Protected Attributes

ISocialPlatform _defaultSocialPlatform
 
CombuServerInfo _serverInfo
 
bool downloading
 

Static Protected Attributes

static CombuManager _instance
 The singleton instance of CombuManager More...
 
static CombuPlatform _platform
 The singleton instance of CombuPlatform. More...
 

Properties

static CombuManager instance [get]
 Gets the current singleton instance. More...
 
static CombuPlatform platform [get]
 Gets the Combu ISocialPlatform implementation. More...
 
static User localUser [get]
 Gets the local user. More...
 
static bool isInitialized [get]
 Gets a value indicating whether the Singleton instance of Combu.CombuManager is initialized. More...
 
ISocialPlatform defaultSocialPlatform [get]
 Gets the default social platform defined (this is set before Combu is set as activate, eventually). More...
 
bool isDownloading [get]
 Gets a value indicating whether this Combu.CombuManager is downloading from a webservice. More...
 
bool isCancelling [get]
 Gets a value indicating whether this Combu.CombuManager is cancelling a webservice request. More...
 
bool isAuthenticated [get]
 Gets a value indicating whether Combu.CombuManager.localUser is authenticated. More...
 
CombuServerInfo serverInfo [get]
 Gets the server info. More...
 

Detailed Description

Combu Manager class, it follows the Singleton pattern design (accessible through the 'instance' static property), it means that you shouldn't have more than one instance of this component in your scene.

Member Function Documentation

void Combu.CombuManager.CallWebservice ( string  url,
WWWForm  form,
System.Action< string, string >  onComplete 
)

Calls a webservice.

Parameters
urlURL.
formForm.
onCompleteOn complete callback.
void Combu.CombuManager.CancelRequest ( )

Cancels the current request (next frame).

static byte [] Combu.CombuManager.CaptureScreenshot ( int  thumbnailHeight = 720,
List< Camera >  excludeCams = null 
)
static

Captures the screen shot.

Returns
The screen shot.
Parameters
thumbnailHeightThumbnail height.
excludeCamsExclude cams.
WWWForm Combu.CombuManager.CreateForm ( User  user = null)

Creates a new form to be passed to a webservice.

Returns
The form.
IEnumerator Combu.CombuManager.DownloadUrl ( string  url,
WWWForm  form,
Action< string, string >  onComplete 
)
protected

Cancels all the current requests (immediately).

Downloads the content of an URL with the specified form.

Returns
The URL.
Parameters
urlURL.
formForm.
onCompleteOn complete.
static string Combu.CombuManager.EncryptMD5 ( string  inputString)
static

Encrypts a string in MD5.

Returns
The M d5.
Parameters
inputStringInput string.
static string Combu.CombuManager.EncryptSHA1 ( string  inputString)
static

Encrypts a string in SHA1.

Returns
The SH a1.
Parameters
inputStringInput string.
void Combu.CombuManager.GetServerInfo ( Action< bool, CombuServerInfo callback)

Gets the server info.

Parameters
callbackCallback.
string Combu.CombuManager.GetUrl ( string  relativeUrl)

Gets the absolute URL from a relative.

Returns
The URL.
Parameters
relativeUrlRelative URL.
void Combu.CombuManager.Ping ( bool  onlyIfAuthenticated = true,
Action< bool >  callback = null 
)

Ping the server.

Parameters
onlyIfAuthenticatedIf set to true then it runs only if local user is authenticated.
callbackCallback.
void Combu.CombuManager.SecureRequest ( WWWForm  form)
protected

Secure the WWWForm by signing the request.

Parameters
formForm.

Member Data Documentation

CombuManager Combu.CombuManager._instance
staticprotected

The singleton instance of CombuManager

CombuPlatform Combu.CombuManager._platform
staticprotected

The singleton instance of CombuPlatform.

string Combu.CombuManager.achievementUIFunction

The achievement user interface function for CombuPlatform.ShowAchievementsUI().

GameObject Combu.CombuManager.achievementUIObject

The achievement user interface object for CombuPlatform.ShowAchievementsUI().

const string Combu.CombuManager.COMBU_VERSION = "2.1.14"

Current API version.

bool Combu.CombuManager.dontDestroyOnLoad = true

Should call DontDestroyOnLoad on the CombuManager gameObject? Recommended: set to true

string Combu.CombuManager.leaderboardUIFunction

The leaderboard user interface function for CombuPlatform.ShowLeaderboardUI().

GameObject Combu.CombuManager.leaderboardUIObject

The leaderboard user interface object for CombuPlatform.ShowLeaderboardUI().

bool Combu.CombuManager.logDebugInfo

Print debug info in the console log.

int Combu.CombuManager.onlineSeconds = 120

The max seconds from now to a user's lastSeen to consider the online state.

float Combu.CombuManager.pingIntervalSeconds = 30f

The ping interval in seconds (set 0 to disable automatic pings). Ping is currently used to mantain the online state of the local user and is automatically called only is the local user is authenticated.

int Combu.CombuManager.playingSeconds = 120

The max seconds from now to a user's lastSeen to consider the playing state.

string Combu.CombuManager.secretKey

The secret key: it must match the define SECRET_KEY configured on the web.

bool Combu.CombuManager.setAsDefaultSocialPlatform

Should set Combu as the active social platform? The previous platform is accessible from defaultSocialPlatform

string Combu.CombuManager.timezone

Can be used to filter the current system date timezone (the value must be valid in PHP: http://www.php.net/manual/en/timezones.php).

string Combu.CombuManager.urlRootProduction

The URL root for the production environment.

string Combu.CombuManager.urlRootStage

The URL root for the stage environment.

bool Combu.CombuManager.useStage

If true sets the stage as current environment (default: false for production).

Property Documentation

ISocialPlatform Combu.CombuManager.defaultSocialPlatform
get

Gets the default social platform defined (this is set before Combu is set as activate, eventually).

The default social platform.

CombuManager Combu.CombuManager.instance
staticget

Gets the current singleton instance.

The instance.

bool Combu.CombuManager.isAuthenticated
get

Gets a value indicating whether Combu.CombuManager.localUser is authenticated.

true if is authenticated; otherwise, false.

bool Combu.CombuManager.isCancelling
get

Gets a value indicating whether this Combu.CombuManager is cancelling a webservice request.

true if is cancelling; otherwise, false.

bool Combu.CombuManager.isDownloading
get

Gets a value indicating whether this Combu.CombuManager is downloading from a webservice.

true if is downloading; otherwise, false.

bool Combu.CombuManager.isInitialized
staticget

Gets a value indicating whether the Singleton instance of Combu.CombuManager is initialized.

true if is initialized; otherwise, false.

User Combu.CombuManager.localUser
staticget

Gets the local user.

The local user.

CombuPlatform Combu.CombuManager.platform
staticget

Gets the Combu ISocialPlatform implementation.

The platform.

CombuServerInfo Combu.CombuManager.serverInfo
get

Gets the server info.

The server info.


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