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

Tournaments class. More...

Public Member Functions

 Tournament (string jsonString)
 Initializes a new instance of the Combu.Tournament class. More...
 
 Tournament (Hashtable data)
 Initializes a new instance of the Combu.Tournament 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 Save (Action< bool, string > callback)
 Save this instance in the database. More...
 
virtual void Delete (Action< bool, string > callback)
 Delete this instance from the database. More...
 
void Leave (Action< bool, string > callback)
 

Static Public Member Functions

static void Delete (long idTournament, Action< bool, string > callback)
 Delete the specified Tournament. More...
 
static void Load (bool finished, SearchCustomData[] customData, System.Action< Tournament[]> callback)
 Load the list of tournaments with the specified filters. More...
 
static void Load (long id, System.Action< Tournament > callback)
 Load the tournament with the specified id. More...
 
static void Leave (long idTournament, long idUser, Action< bool, string > callback)
 
static Tournament QuickTournament (Profile[] users)
 Creates a quick tournament. If the number of other users is 1 then it creates 3 rounds, else 2 rounds for each enemy. More...
 

Public Attributes

long id = 0
 
long idOwner = 0
 
string title = ""
 
DateTime dateCreation = DateTime.Now
 
DateTime dateFinished = null
 
Hashtable customData = new Hashtable()
 

Properties

Profile owner [get]
 
List< Matchmatches [get]
 
bool finished [get]
 

Detailed Description

Tournaments class.

Constructor & Destructor Documentation

Combu.Tournament.Tournament ( string  jsonString)

Initializes a new instance of the Combu.Tournament class.

Parameters
jsonStringJSON string to initialize the instance.
Combu.Tournament.Tournament ( Hashtable  data)

Initializes a new instance of the Combu.Tournament class.

Parameters
dataData to initialize the instance.

Member Function Documentation

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

Delete this instance from the database.

static void Combu.Tournament.Delete ( long  idTournament,
Action< bool, string >  callback 
)
static

Delete the specified Tournament.

Parameters
idTournamentIdentifier tournament.
callbackCallback.
virtual void Combu.Tournament.FromHashtable ( Hashtable  hash)
virtual

Initialize the object from a hashtable.

Parameters
hashHash.
virtual void Combu.Tournament.FromJson ( string  jsonString)
virtual

Initialize the object from a JSON formatted string.

Parameters
jsonStringJson string.
static void Combu.Tournament.Load ( bool  finished,
SearchCustomData[]  customData,
System.Action< Tournament[]>  callback 
)
static

Load the list of tournaments with the specified filters.

Parameters
finishedIf set to true then it returns also the finished tournaments.
customDataCustom data.
callbackCallback.
static void Combu.Tournament.Load ( long  id,
System.Action< Tournament callback 
)
static

Load the tournament with the specified id.

Parameters
idIdentifier.
callbackCallback.
static Tournament Combu.Tournament.QuickTournament ( Profile[]  users)
static

Creates a quick tournament. If the number of other users is 1 then it creates 3 rounds, else 2 rounds for each enemy.

Returns
The tournament.
Parameters
usersThe list of other users (excluding localUser).
virtual void Combu.Tournament.Save ( Action< bool, string >  callback)
virtual

Save this instance in the database.

Parameters
callbackCallback.

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