Combu  3.2.2
Unity API Documentation
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Properties | List of all members
Combu.Match Class Reference

Classes

class  MatchRoundData
 

Public Member Functions

 Match (string jsonString)
 Initializes a new instance of the Combu.Match class. More...
 
 Match (Hashtable data)
 Initializes a new instance of the Combu.Match class. More...
 
virtual void FromJson (string jsonString)
 Initialize the object from a JSON formatted string. More...
 
virtual void FromHashtable (Hashtable hash)
 Initialize the object from a hashtable. More...
 
virtual void AddUser (Profile user)
 Adds the user to this match. More...
 
virtual void RemoveUser (Profile user)
 Removes the user. More...
 
virtual void RemoveUser (long idUser)
 Removes the user. More...
 
virtual void RemoveUser (string username)
 Removes the user. More...
 
void Score (float score, Action< bool, string > callback)
 Send the specified score. More...
 
void Save (Action< bool, string > callback)
 Save the this instance in the server. More...
 
virtual void Delete (Action< bool, string > callback)
 Delete this instance from the database. More...
 

Static Public Member Functions

static void Delete (long idMatch, Action< bool, string > callback)
 Delete the specified Match. More...
 
static void QuickMatch (bool friendsOnly, SearchCustomData[] customData, int rounds, Action< Match > callback)
 Creates a quick match. More...
 
static void Load (long idTournament, bool activeOnly, string title, Action< Match[]> callback)
 Load the list of Matchs by specified filters. More...
 
static void Load (long idMatch, Action< Match > callback)
 Load the specified Match. More...
 

Public Attributes

long id = 0
 
long idTournament = 0
 
string title = ""
 
int roundsCount = 1
 
DateTime dateCreation = DateTime.Now
 
DateTime? dateExpire = null
 
Hashtable customData = new Hashtable()
 

Protected Member Functions

virtual void RemoveUser (long idUser, string username)
 Removes the user. More...
 

Properties

List< MatchAccountusers [get]
 
List< MatchRoundDatarounds [get]
 
bool finished [get]
 
bool searchingQuickMatch [get]
 

Constructor & Destructor Documentation

◆ Match() [1/2]

Combu.Match.Match ( string  jsonString)

Initializes a new instance of the Combu.Match class.

Parameters
jsonStringJSON string to initialize the instance.

◆ Match() [2/2]

Combu.Match.Match ( Hashtable  data)

Initializes a new instance of the Combu.Match class.

Parameters
dataData to initialize the instance.

Member Function Documentation

◆ AddUser()

virtual void Combu.Match.AddUser ( Profile  user)
virtual

Adds the user to this match.

Parameters
userUser.

◆ Delete() [1/2]

virtual void Combu.Match.Delete ( Action< bool, string >  callback)
virtual

Delete this instance from the database.

◆ Delete() [2/2]

static void Combu.Match.Delete ( long  idMatch,
Action< bool, string >  callback 
)
static

Delete the specified Match.

Parameters
idMatchIdentifier match.
callbackCallback.

◆ FromHashtable()

virtual void Combu.Match.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.

◆ FromJson()

virtual void Combu.Match.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.

◆ Load() [1/2]

static void Combu.Match.Load ( long  idMatch,
Action< Match callback 
)
static

Load the specified Match.

Parameters
idMatchIdentifier match.
callbackCallback.

◆ Load() [2/2]

static void Combu.Match.Load ( long  idTournament,
bool  activeOnly,
string  title,
Action< Match[]>  callback 
)
static

Load the list of Matchs by specified filters.

Parameters
idTournamentIdentifier tournament.
activeOnlyIf set to true then displays active matches only, else archived matches.
titleTitle.
callbackCallback.

◆ QuickMatch()

static void Combu.Match.QuickMatch ( bool  friendsOnly,
SearchCustomData[]  customData,
int  rounds,
Action< Match callback 
)
static

Creates a quick match.

Parameters
callbackCallback.

◆ RemoveUser() [1/4]

virtual void Combu.Match.RemoveUser ( long  idUser)
virtual

Removes the user.

Parameters
idUserIdentifier user.

◆ RemoveUser() [2/4]

virtual void Combu.Match.RemoveUser ( long  idUser,
string  username 
)
protectedvirtual

Removes the user.

Parameters
idUserIdentifier user.
usernameUsername.

◆ RemoveUser() [3/4]

virtual void Combu.Match.RemoveUser ( Profile  user)
virtual

Removes the user.

Parameters
userUser.

◆ RemoveUser() [4/4]

virtual void Combu.Match.RemoveUser ( string  username)
virtual

Removes the user.

Parameters
usernameUsername.

◆ Save()

void Combu.Match.Save ( Action< bool, string >  callback)

Save the this instance in the server.

Parameters
callbackCallback.

◆ Score()

void Combu.Match.Score ( float  score,
Action< bool, string >  callback 
)

Send the specified score.

Parameters
scoreScore.
callbackCallback.