CloudOnce v2.7.5
Unified Game Services API
CloudOnce.Internal.PersistentCurrency Class Reference

A currency that is stored in the cloud. More...

Inheritance diagram for CloudOnce.Internal.PersistentCurrency:
[legend]
Collaboration diagram for CloudOnce.Internal.PersistentCurrency:
[legend]

Public Member Functions

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...
 

Protected Member Functions

 PersistentCurrency (string key, float defaultValue, bool allowNegative)
 

Properties

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

A currency that is stored in the cloud.

Member Function Documentation

◆ Flush()

void CloudOnce.Internal.PersistentCurrency.Flush ( )
inline

Invokes the cloud preference's delegate used to save data.

Implements CloudOnce.Internal.IPersistent.

◆ Load()

void CloudOnce.Internal.PersistentCurrency.Load ( bool  force = false)
inline

Invokes the cloud preference's delegate used to load data.

Parameters
forceForce load, ignoring PersistenceType.

Implements CloudOnce.Internal.IPersistent.

◆ Reset()

void CloudOnce.Internal.PersistentCurrency.Reset ( )
inline

Use with caution! Completely resets currency. All additions and subtractions for every registered device are lost.

Implements CloudOnce.Internal.IPersistent.


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