Mad Level Manager
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events
Classes | Static Public Member Functions | Public Attributes | Properties | List of all members
MadLevelManager.MadLevelProfile Class Reference

Manages player profiles and game progress (save & load). More...

Static Public Member Functions

static void LoadProfileFromString (string str)
 
static void Reload ()
 Forces reload of profile data. Useful for testing purposes. More...
 
static string SaveProfileToString ()
 
static void RegisterProfile (string profileName)
 Registers profile if not yet registered. Registration of profile is optional. If you try to use profile for the first time by assigning profile name to 'profile' field then new profile will be created. More...
 
static void UnregisterProfile (string profileName)
 Unregisters the given profile name. All profile data will be permanently removed from the device. If current profile is profile that is given to be unregistered, current profile will be changed to defualt. More...
 
static List< string > GetLevelNames ()
 
static List< string > GetLevelPropertyNames (string levelName)
 
static List< string > GetProfilePropertyNames ()
 
static string GetLevelAny (string levelName, string property)
 Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type. More...
 
static string GetLevelAny (string levelName, string property, string def)
 Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type. More...
 
static string GetProfileAny (string property)
 Gets global-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type. More...
 
static bool GetLevelBoolean (string levelName, string property)
 Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method. More...
 
static bool GetLevelBoolean (string levelName, string property, bool def)
 Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method. More...
 
static void SetLevelBoolean (string levelName, string property, bool val)
 Sets level-scoped property as boolean type. You can access it later using GetLevelBoolean or GetLevelAny methods. More...
 
static void SetProfileBoolean (string property, bool val)
 Sets profile-scoped property as boolean type. You can access it later using GetProfileBoolean or GetProfileAny methods. More...
 
static bool GetProfileBoolean (string property)
 Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method. More...
 
static bool GetProfileBoolean (string property, bool def)
 Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method. More...
 
static int GetLevelInteger (string levelName, string property)
 Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method. More...
 
static int GetLevelInteger (string levelName, string property, int def)
 Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method. More...
 
static void SetLevelInteger (string levelName, string property, int val)
 Sets level-scoped property as integer type. You can access it later using GetLevelInteger or GetLevelAny methods. More...
 
static void SetProfileInteger (string property, int val)
 Sets profile-scoped property as integer type. You can access it later using GetProfileInteger or GetProfileAny methods. More...
 
static int GetProfileInteger (string property)
 Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method. More...
 
static int GetProfileInteger (string property, int def)
 Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method. More...
 
static float GetLevelFloat (string levelName, string property)
 Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method. More...
 
static float GetLevelFloat (string levelName, string property, float def)
 Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method. More...
 
static void SetLevelFloat (string levelName, string property, float val)
 Sets level-scoped property as float type. You can access it later using GetLevelFloat or GetLevelAny methods. More...
 
static void SetProfileFloat (string property, float val)
 Sets profile-scoped property as float type. You can access it later using GetProfileFloat or GetProfileAny methods. More...
 
static float GetProfileFloat (string property)
 Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method. More...
 
static float GetProfileFloat (string property, float def)
 Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method. More...
 
static string GetLevelString (string levelName, string property)
 Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method. More...
 
static string GetLevelString (string levelName, string property, string def)
 Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method. More...
 
static void SetLevelString (string levelName, string property, string val)
 Sets level-scoped property as string type. You can access it later using GetLevelString or GetLevelAny methods. More...
 
static void SetProfileString (string property, string val)
 Sets profile-scoped property as string type. You can access it later using GetProfileString or GetProfileAny methods. More...
 
static string GetProfileString (string property)
 Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method. More...
 
static string GetProfileString (string property, string def)
 Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method. More...
 
static bool IsPropertyEnabled (string levelName, string property)
 
static void SetPropertyEnabled (string levelName, string property, bool enabled)
 
static bool IsProfilePropertySet (string property)
 
static bool IsLevelPropertySet (string levelName, string property)
 
static bool IsPropertySet (string levelName, string property)
 
static bool IsCompleted (string levelName)
 
static bool IsCompleted (string levelName, bool def)
 
static void SetCompleted (string levelName, bool completed)
 
static bool IsCompletedSet (string levelName)
 
static bool IsLocked (string levelName)
 
static bool IsLocked (string levelName, bool def)
 
static void SetLocked (string levelName, bool locked)
 
static bool IsLockedSet (string levelName)
 
static bool IsLevelSet (string levelName)
 
static void RenameLevel (string oldName, string newName)
 
static void Save ()
 
static void Reset ()
 

Public Attributes

const string DefaultProfile = "_default"
 

Properties

static string profile [get, set]
 
static string[] profileList [get, set]
 
static string recentLevelSelected [get, set]
 Gets or sets the name of recently choosen level. This is NOT a scene name but the name of icon game object. More...
 

Detailed Description

Manages player profiles and game progress (save & load).

Member Function Documentation

static string MadLevelManager.MadLevelProfile.GetLevelAny ( string  levelName,
string  property 
)
static

Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type.

Returns
String representation of property value. Empty string if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
static string MadLevelManager.MadLevelProfile.GetLevelAny ( string  levelName,
string  property,
string  def 
)
static

Gets level-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type.

Returns
String representation of property value. Empty string if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
defDefault value.
static bool MadLevelManager.MadLevelProfile.GetLevelBoolean ( string  levelName,
string  property 
)
static

Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method.

Returns
Boolean representation of property value or false if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
static bool MadLevelManager.MadLevelProfile.GetLevelBoolean ( string  levelName,
string  property,
bool  def 
)
static

Gets level-scoped property value as boolean type. You can get value of properties only set using SetLevelBoolean method.

Returns
Boolean representation of property value or given default value if unset.
Parameters
levelNameLevel name.
propertyProperty name.
defDefault value to return if value is unset.
static float MadLevelManager.MadLevelProfile.GetLevelFloat ( string  levelName,
string  property 
)
static

Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method.

Returns
Float representation of property value or 0 if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
static float MadLevelManager.MadLevelProfile.GetLevelFloat ( string  levelName,
string  property,
float  def 
)
static

Gets level-scoped property value as float type. You can get value of properties only set using SetLevelFloat method.

Returns
Float representation of property value or given default value if unset.
Parameters
levelNameLevel name.
propertyProperty name.
defDefault value to return if value is unset.
static int MadLevelManager.MadLevelProfile.GetLevelInteger ( string  levelName,
string  property 
)
static

Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method.

Returns
Integer representation of property value or 0 if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
static int MadLevelManager.MadLevelProfile.GetLevelInteger ( string  levelName,
string  property,
int  def 
)
static

Gets level-scoped property value as integer type. You can get value of properties only set using SetLevelInteger method.

Returns
Integer representation of property value or given default value if unset.
Parameters
levelNameLevel name.
propertyProperty name.
defDefault value to return if value is unset.
static string MadLevelManager.MadLevelProfile.GetLevelString ( string  levelName,
string  property 
)
static

Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method.

Returns
String representation of property value or empty string if value is unset.
Parameters
levelNameLevel name.
propertyProperty name.
static string MadLevelManager.MadLevelProfile.GetLevelString ( string  levelName,
string  property,
string  def 
)
static

Gets level-scoped property value as string type. You can get value of properties only set using SetLevelString method.

Returns
String representation of property value or given default value if unset.
Parameters
levelNameLevel name.
propertyProperty name.
defDefault value to return if value is unset.
static string MadLevelManager.MadLevelProfile.GetProfileAny ( string  property)
static

Gets global-scoped property value of any type as string. Use this method if you only need a string representation of a value and you don't want to concern about its type.

Returns
String representation of property value. Empty string if value is unset.
Parameters
propertyProperty name.
static bool MadLevelManager.MadLevelProfile.GetProfileBoolean ( string  property)
static

Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method.

Returns
Boolean representation of property value or false if value is unset.
Parameters
propertyProperty name.
static bool MadLevelManager.MadLevelProfile.GetProfileBoolean ( string  property,
bool  def 
)
static

Gets global-scoped property value as boolean type. You can get value of properties only set using SetProfileBoolean method.

Returns
Boolean representation of property value or given default if value is unset.
Parameters
propertyProperty name.
defDefault value to return if value is unset.
static float MadLevelManager.MadLevelProfile.GetProfileFloat ( string  property)
static

Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method.

Returns
Float representation of property value or 0 if value is unset.
Parameters
propertyProperty name.
static float MadLevelManager.MadLevelProfile.GetProfileFloat ( string  property,
float  def 
)
static

Gets global-scoped property value as float type. You can get value of properties only set using SetProfileFloat method.

Returns
Float representation of property value or given default if value is unset.
Parameters
propertyProperty name.
defDefault value to return if value is unset.
static int MadLevelManager.MadLevelProfile.GetProfileInteger ( string  property)
static

Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method.

Returns
Integer representation of property value or 0 if value is unset.
Parameters
propertyProperty name.
static int MadLevelManager.MadLevelProfile.GetProfileInteger ( string  property,
int  def 
)
static

Gets global-scoped property value as integer type. You can get value of properties only set using SetProfileInteger method.

Returns
Integer representation of property value or given default if value is unset.
Parameters
propertyProperty name.
defDefault value to return if value is unset.
static string MadLevelManager.MadLevelProfile.GetProfileString ( string  property)
static

Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method.

Returns
String representation of property value or empty string if value is unset.
Parameters
propertyProperty name.
static string MadLevelManager.MadLevelProfile.GetProfileString ( string  property,
string  def 
)
static

Gets global-scoped property value as string type. You can get value of properties only set using SetProfileString method.

Returns
String representation of property value or given default if value is unset.
Parameters
propertyProperty name.
defDefault value to return if value is unset.
static void MadLevelManager.MadLevelProfile.RegisterProfile ( string  profileName)
static

Registers profile if not yet registered. Registration of profile is optional. If you try to use profile for the first time by assigning profile name to 'profile' field then new profile will be created.

Parameters
profileNameProfile name.
static void MadLevelManager.MadLevelProfile.Reload ( )
static

Forces reload of profile data. Useful for testing purposes.

static void MadLevelManager.MadLevelProfile.SetLevelBoolean ( string  levelName,
string  property,
bool  val 
)
static

Sets level-scoped property as boolean type. You can access it later using GetLevelBoolean or GetLevelAny methods.

Parameters
levelNameLevel name.
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetLevelFloat ( string  levelName,
string  property,
float  val 
)
static

Sets level-scoped property as float type. You can access it later using GetLevelFloat or GetLevelAny methods.

Parameters
levelNameLevel name.
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetLevelInteger ( string  levelName,
string  property,
int  val 
)
static

Sets level-scoped property as integer type. You can access it later using GetLevelInteger or GetLevelAny methods.

Parameters
levelNameLevel name.
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetLevelString ( string  levelName,
string  property,
string  val 
)
static

Sets level-scoped property as string type. You can access it later using GetLevelString or GetLevelAny methods.

Parameters
levelNameLevel name.
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetProfileBoolean ( string  property,
bool  val 
)
static

Sets profile-scoped property as boolean type. You can access it later using GetProfileBoolean or GetProfileAny methods.

Parameters
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetProfileFloat ( string  property,
float  val 
)
static

Sets profile-scoped property as float type. You can access it later using GetProfileFloat or GetProfileAny methods.

Parameters
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetProfileInteger ( string  property,
int  val 
)
static

Sets profile-scoped property as integer type. You can access it later using GetProfileInteger or GetProfileAny methods.

Parameters
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.SetProfileString ( string  property,
string  val 
)
static

Sets profile-scoped property as string type. You can access it later using GetProfileString or GetProfileAny methods.

Parameters
propertyProperty name.
valValue to set.
static void MadLevelManager.MadLevelProfile.UnregisterProfile ( string  profileName)
static

Unregisters the given profile name. All profile data will be permanently removed from the device. If current profile is profile that is given to be unregistered, current profile will be changed to defualt.

Parameters
profileNameProfile name to unregister.

Property Documentation

string MadLevelManager.MadLevelProfile.recentLevelSelected
staticgetset

Gets or sets the name of recently choosen level. This is NOT a scene name but the name of icon game object.

The recent level selected name (NOT a scene name).


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