CloudOnce v2.7.5
Unified Game Services API
CloudOnce.CloudPrefs.CloudCurrencyInt Class Reference

Used to create virtual currencies that gets stored in the cloud. This type uses int values. It has a special conflict resolution system based on this article: https://developer.android.com/training/cloudsave/conflict-res.html More...

Inheritance diagram for CloudOnce.CloudPrefs.CloudCurrencyInt:
[legend]
Collaboration diagram for CloudOnce.CloudPrefs.CloudCurrencyInt:
[legend]

Public Member Functions

 CloudCurrencyInt (string key, int defaultValue=0, bool allowNegative=false)
 Used to create virtual currencies that gets stored in the cloud. This type uses int values. It has a special conflict resolution system based on this article: https://developer.android.com/training/cloudsave/conflict-res.html More...
 
- Public Member Functions inherited from CloudOnce.Internal.PersistentCurrency
void Flush ()
 Invokes the cloud preference's delegate used to save data. More...
 
void Load (bool force=false)
 Invokes the cloud preference's delegate used to load data. More...
 
void Reset ()
 Use with caution! Completely resets currency. All additions and subtractions for every registered device are lost. More...
 
void Flush ()
 Invokes the cloud preference's delegate used to save data. More...
 
void Load (bool force=false)
 Invokes the cloud preference's delegate used to load data. More...
 
void Reset ()
 Resets the IPersistent to default/initial value. More...
 

Properties

new int Additions [get]
 Total additions made to this currency.
 
new int Subtractions [get]
 Total subtractions made to this currency.
 
new int DefaultValue [get]
 The currency's default/starting value. Can't be changed after the currency is created.
 
new int Value [get, set]
 Current value for this currency.
 
- Properties inherited from CloudOnce.Internal.PersistentCurrency
string Key [get]
 The unique identifier for this particular currency.
 
float Additions [get]
 Total additions made to this currency.
 
float Subtractions [get]
 Total subtractions made to this currency.
 
float Value [get, set]
 Current value for this currency.
 
float DefaultValue [get]
 The currency's default/starting value. Can't be changed after the currency is created.
 
bool AllowNegative [get]
 If the value of this currency is allowed to be negative.
 

Additional Inherited Members

- Protected Member Functions inherited from CloudOnce.Internal.PersistentCurrency
 PersistentCurrency (string key, float defaultValue, bool allowNegative)
 

Detailed Description

Used to create virtual currencies that gets stored in the cloud. This type uses int values. It has a special conflict resolution system based on this article: https://developer.android.com/training/cloudsave/conflict-res.html

Constructor & Destructor Documentation

◆ CloudCurrencyInt()

CloudOnce.CloudPrefs.CloudCurrencyInt.CloudCurrencyInt ( string  key,
int  defaultValue = 0,
bool  allowNegative = false 
)
inline

Used to create virtual currencies that gets stored in the cloud. This type uses int values. It has a special conflict resolution system based on this article: https://developer.android.com/training/cloudsave/conflict-res.html

Parameters
keyA unique identifier for this particular currency.
defaultValueThe currency's default/starting value.
allowNegativeIf the value of this currency is allowed to be negative.

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