CotC C# SDK for Unity  v1.4.0.1
Making social games is easy !
Properties | Public Member Functions | List of all members

Description

Important object from the SDK, allowing to perform many operations that depend on a currently logged in user.

This object is almost stateless. You may drop it without worrying about background processes that may still run. User related events are handled by a corresponding instance of DomainEventLoop, which should be started as soon as the user is logged in.

Properties

List< string > Domains [get]
 
string GamerId [get]
 Gamer credential. Use it to gain access to user related tasks. More...
 
string GamerSecret [get]
 Gamer credential (secret). Same purpose as GamerId, and you will need those in pair. More...
 
LoginNetwork Network [get]
 
string NetworkId [get]
 
DateTime RegisterTime [get]
 
GamerAccountMethods?? Account [get]
 Provides account related functions for the current gamer. More...
 
GamerAchievements?? Achievements [get]
 Provides an API to manipulate achievements. More...
 
GamerBatches?? Batches [get]
 Provides an API to run batches. More...
 
GamerCommunity?? Community [get]
 Provides an API to interact with friends on CotC. More...
 
GamerKvStore?? KvStore [get]
 Returns an object that allows to manipulate the key/value store (with ACL rights) system. More...
 
GamerVfs?? GamerVfs [get]
 Returns an object that allows to manipulate the key/value system associated with this user. More...
 
GamerGodfather?? Godfather [get]
 Exposes functionality related to the godfathers. More...
 
GamerMatches?? Matches [get]
 Provides an API to manipulate matches (mainly start them, since working with existing matches is provided by the Match class). More...
 
GamerProfileMethods?? Profile [get]
 Allows to manipulate information related to the gamer profile. More...
 
GamerProperties?? Properties [get]
 Allows to manipulate the properties of the current gamer. More...
 
GamerScores?? Scores [get]
 Provides an API able to handle functionality related to the leaderboards and scores. More...
 
GamerStore?? Store [get]
 Allows to list, buy products and so on. This functionality is low level and you should use the appropriate external plugin to help with the purchase process. More...
 
GamerTransactions?? Transactions [get]
 Allows to manipulate the transactions and related achievements of an user. More...
 
- Properties inherited from CotcSdk.PropertiesObject
Bundle this[string key] [get]
 Allows to query additional properties via an indexer (can be enriched via hooks). More...
 

Public Member Functions

DomainEventLoop StartEventLoop (string domain=Common.PrivateDomain)
 Starts a DomainEventLoop in order to catch events related to this logged in gamer. More...
 
- Public Member Functions inherited from CotcSdk.PropertiesObject
Bundle AsBundle ()
 Gets the underlying Bundle. Dangerous, only use internally, when you want to put the contents of a properties object into an existing bundle. More...
 
Dictionary< string, Bundle >.KeyCollection Keys ()
 Allows to browse all keys (might include some that are already exposed as typed properties in the object). More...
 
Dictionary< string, Bundle >.Enumerator GetEnumerator ()
 Allows to browse all keys (might include some that are already exposed as typed properties in the object). More...
 
override string ToString ()
 You may use this to debug what is inside this property object. More...
 
string ToJson ()
 Builds a JSON representation of this object, same as ToString actually. More...
 

Additional Inherited Members

- Protected Member Functions inherited from CotcSdk.PropertiesObject
 PropertiesObject (Bundle baseData)
 
- Protected Attributes inherited from CotcSdk.PropertiesObject
Bundle Props
 
Inheritance diagram for CotcSdk.Gamer:
CotcSdk.PropertiesObject

Property Documentation

◆ Account

GamerAccountMethods?? CotcSdk.Gamer.Account
get

Provides account related functions for the current gamer.

Returns
An object allowing to manipulate the account of the current gamer.

◆ Achievements

GamerAchievements?? CotcSdk.Gamer.Achievements
get

Provides an API to manipulate achievements.

Returns
An object that allows to manipulate achievements.

◆ Batches

GamerBatches?? CotcSdk.Gamer.Batches
get

Provides an API to run batches.

Returns
An object that allows to manipulate batches.

◆ Community

GamerCommunity?? CotcSdk.Gamer.Community
get

Provides an API to interact with friends on CotC.

Returns
An object that allow to manipulate friends.

◆ GamerId

string CotcSdk.Gamer.GamerId
get

Gamer credential. Use it to gain access to user related tasks.

◆ GamerSecret

string CotcSdk.Gamer.GamerSecret
get

Gamer credential (secret). Same purpose as GamerId, and you will need those in pair.

◆ GamerVfs

GamerVfs?? CotcSdk.Gamer.GamerVfs
get

Returns an object that allows to manipulate the key/value system associated with this user.

Returns
An object allowing to manipulate key/values for this user/domain.

◆ Godfather

GamerGodfather?? CotcSdk.Gamer.Godfather
get

Exposes functionality related to the godfathers.

Returns
An object that allows to add a godfather, generate a code, etc.

◆ KvStore

GamerKvStore?? CotcSdk.Gamer.KvStore
get

Returns an object that allows to manipulate the key/value store (with ACL rights) system.

Returns
An object allowing to manipulate key/value store for this user/domain.

◆ Matches

GamerMatches?? CotcSdk.Gamer.Matches
get

Provides an API to manipulate matches (mainly start them, since working with existing matches is provided by the Match class).

Returns
An object that allows to perform basic operations on matches.

◆ Profile

GamerProfileMethods?? CotcSdk.Gamer.Profile
get

Allows to manipulate information related to the gamer profile.

Returns
An object that allows to read and set the profile.

◆ Properties

GamerProperties?? CotcSdk.Gamer.Properties
get

Allows to manipulate the properties of the current gamer.

Returns
An object that allows to set, delete, etc. property values.

◆ Scores

GamerScores?? CotcSdk.Gamer.Scores
get

Provides an API able to handle functionality related to the leaderboards and scores.

Returns
An object that allows to manipulate scores.

◆ Store

GamerStore?? CotcSdk.Gamer.Store
get

Allows to list, buy products and so on. This functionality is low level and you should use the appropriate external plugin to help with the purchase process.

Returns
An object that allows access to the store on a CotC point of view.

◆ Transactions

GamerTransactions?? CotcSdk.Gamer.Transactions
get

Allows to manipulate the transactions and related achievements of an user.

Returns
An object that allows to manipulate transactions and query achievements.

Member Function Documentation

◆ StartEventLoop()

DomainEventLoop CotcSdk.Gamer.StartEventLoop ( string  domain = Common.PrivateDomain)

Starts a DomainEventLoop in order to catch events related to this logged in gamer.

The loop will be running forever unless an error happens with this gamer (meaning that the gamer is not valid anymore, which can happen if he's not logged in). When stopping or pausing the application, you should call the corresponding methods on the loop to stop or pause it. The system will pause the loop automatically upon application pause and resume it as needed, which is done through the CotcGameObject as placed on your scene.

Parameters
domainDomain to listen on. The private domain is used to receive system notifications as well as messages sent by other players. Unless cross-game functionality is used, you should start one loop on the private domain as soon as the gamer is signed in.
Returns
A domain event loop that is in started state.