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

Used to create virtual currencies that gets stored in the cloud. This type uses float 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.CloudCurrencyFloat:
[legend]
Collaboration diagram for CloudOnce.CloudPrefs.CloudCurrencyFloat:
[legend]

Public Member Functions

 CloudCurrencyFloat (string key, float defaultValue=0f, bool allowNegative=false)
 Used to create virtual currencies that gets stored in the cloud. This type uses float 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...
 

Additional Inherited Members

- Protected Member Functions inherited from CloudOnce.Internal.PersistentCurrency
 PersistentCurrency (string key, float defaultValue, bool allowNegative)
 
- 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.
 

Detailed Description

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

Constructor & Destructor Documentation

◆ CloudCurrencyFloat()

CloudOnce.CloudPrefs.CloudCurrencyFloat.CloudCurrencyFloat ( string  key,
float  defaultValue = 0f,
bool  allowNegative = false 
)
inline

Used to create virtual currencies that gets stored in the cloud. This type uses float 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: