Esempio n. 1
0
    //############################################### bool ##############################################

    //Set an array of bool
    public static void SetBoolArray(string key, bool[] value)
    {
        PlayerPrefs.SetInt("PlayerPrefsArray:Bool:L:" + key, value.Length);
        int i = 0;

        while (i < value.Length)
        {
            NewPPrefs.SetBool("PlayerPrefsArray:Bool:" + key + i.ToString(), value[i]);
            ++i;
        }
    }
Esempio n. 2
0
    //############################################### Rect ##############################################

    //Set an array of Rects
    public static void SetRectArray(string key, Rect[] value)
    {
        PlayerPrefs.SetInt("PlayerPrefsArray:Rect:L:" + key, value.Length);
        int i = 0;

        while (i < value.Length)
        {
            NewPPrefs.SetRect("PlayerPrefsArray:Rect:" + key + i.ToString(), value[i]);
            ++i;
        }
    }
Esempio n. 3
0
    //############################################### Quaternion ##############################################

    //Set an array of Quaternions
    public static void SetQuaternionArray(string key, Quaternion[] value)
    {
        PlayerPrefs.SetInt("PlayerPrefsArray:Quaternion:L:" + key, value.Length);
        int i = 0;

        while (i < value.Length)
        {
            NewPPrefs.SetQuaternion("PlayerPrefsArray:Quaternion:" + key + i.ToString(), value[i]);
            ++i;
        }
    }
Esempio n. 4
0
    //############################################### Vector4 ##############################################

    //Set an array of Vector4s
    public static void SetVector4Array(string key, Vector4[] value)
    {
        PlayerPrefs.SetInt("PlayerPrefsArray:Vector4:L:" + key, value.Length);
        int i = 0;

        while (i < value.Length)
        {
            NewPPrefs.SetVector4("PlayerPrefsArray:Vector4:" + key + i.ToString(), value[i]);
            ++i;
        }
    }
Esempio n. 5
0
    //############################################### Color32 ##############################################

    //Set an array of Colour32s
    public static void SetColour32Array(string key, Color32[] value)
    {
        PlayerPrefs.SetInt("PlayerPrefsArray:Colour32:L:" + key, value.Length);
        int i = 0;

        while (i < value.Length)
        {
            NewPPrefs.SetColour32("PlayerPrefsArray:Colour32:" + key + i.ToString(), value[i]);
            ++i;
        }
    }
Esempio n. 6
0
    //Get an array of Rects
    public static Rect[] GetRectArray(string key)
    {
        Rect[] returns = new Rect[PlayerPrefs.GetInt("PlayerPrefsArray:Rect:L:" + key)];

        int i = 0;

        while (i < PlayerPrefs.GetInt("PlayerPrefsArray:Rect:L:" + key))
        {
            returns.SetValue(NewPPrefs.GetRect("PlayerPrefsArray:Rect:" + key + i.ToString()), i);
            ++i;
        }
        return(returns);
    }
Esempio n. 7
0
    //Get an array of Quaternions
    public static Quaternion[] GetQuaternionArray(string key)
    {
        Quaternion[] returns = new Quaternion[PlayerPrefs.GetInt("PlayerPrefsArray:Quaternion:L:" + key)];

        int i = 0;

        while (i < PlayerPrefs.GetInt("PlayerPrefsArray:Quaternion:L:" + key))
        {
            returns.SetValue(NewPPrefs.GetQuaternion("PlayerPrefsArray:Quaternion:" + key + i.ToString()), i);
            ++i;
        }
        return(returns);
    }
Esempio n. 8
0
    //Get an array of Vector4s
    public static Vector4[] GetVector4Array(string key)
    {
        Vector4[] returns = new Vector4[PlayerPrefs.GetInt("PlayerPrefsArray:Vector4:L:" + key)];

        int i = 0;

        while (i < PlayerPrefs.GetInt("PlayerPrefsArray:Vector4:L:" + key))
        {
            returns.SetValue(NewPPrefs.GetVector4("PlayerPrefsArray:Vector4:" + key + i.ToString()), i);
            ++i;
        }
        return(returns);
    }
Esempio n. 9
0
    //Get an array of Colour32s
    public static Color32[] GetColour32Array(string key)
    {
        Color32[] returns = new Color32[PlayerPrefs.GetInt("PlayerPrefsArray:Colour32:L:" + key)];

        int i = 0;

        while (i < PlayerPrefs.GetInt("PlayerPrefsArray:Colour32:L:" + key))
        {
            returns.SetValue(NewPPrefs.GetColour32("PlayerPrefsArray:Colour32:" + key + i.ToString()), i);
            ++i;
        }
        return(returns);
    }
Esempio n. 10
0
    //Get an array of bools
    public static bool[] GetBoolArray(string key)
    {
        bool[] returns = new bool[PlayerPrefs.GetInt("PlayerPrefsArray:Bool:L:" + key)];

        int i = 0;

        while (i < PlayerPrefs.GetInt("PlayerPrefsArray:Bool:L:" + key))
        {
            returns.SetValue(NewPPrefs.GetBool("PlayerPrefsArray:Bool:" + key + i.ToString()), i);
            ++i;
        }
        return(returns);
    }