Exemplo n.º 1
0
    private void OnGotTusData(Messages.PluginMessage msg)
    {
        switch (this.m_TUSDataRequestType)
        {
        case SonyNpCloudTUS.TUSDataRequestType.LoadRawData:
        {
            OnScreenLog.Add("Got TUS Data");
            byte[] tusData = TusTss.GetTusData();
            OnScreenLog.Add(" Data size: " + tusData.Length);
            string text = string.Empty;
            int    num  = 0;
            while (num < 16 && num < tusData.Length)
            {
                text = text + tusData[num].ToString() + ", ";
                num++;
            }
            OnScreenLog.Add(" Data: " + text);
            break;
        }

        case SonyNpCloudTUS.TUSDataRequestType.LoadPlayerPrefs:
        {
            OnScreenLog.Add("Got PlayerPrefs from TUS...");
            byte[] tusData = TusTss.GetTusData();
            PSVitaPlayerPrefs.LoadFromByteArray(tusData);
            OnScreenLog.Add(" keyA = " + PlayerPrefs.GetInt("keyA"));
            OnScreenLog.Add(" keyB = " + PlayerPrefs.GetString("keyB"));
            OnScreenLog.Add(" keyC = " + PlayerPrefs.GetInt("keyC"));
            OnScreenLog.Add(" keyD = " + PlayerPrefs.GetInt("keyD"));
            break;
        }
        }
    }
Exemplo n.º 2
0
    private void OnGotTusData(Messages.PluginMessage msg)
    {
        switch (m_TUSDataRequestType)
        {
        case TUSDataRequestType.SavePlayerPrefs:
            break;

        case TUSDataRequestType.LoadPlayerPrefs:
        {
            OnScreenLog.Add("Got PlayerPrefs from TUS...");
            byte[] tusData = TusTss.GetTusData();
            PSVitaPlayerPrefs.LoadFromByteArray(tusData);
            OnScreenLog.Add(" keyA = " + PlayerPrefs.GetInt("keyA"));
            OnScreenLog.Add(" keyB = " + PlayerPrefs.GetString("keyB"));
            OnScreenLog.Add(" keyC = " + PlayerPrefs.GetInt("keyC"));
            OnScreenLog.Add(" keyD = " + PlayerPrefs.GetInt("keyD"));
            break;
        }

        case TUSDataRequestType.LoadRawData:
        {
            OnScreenLog.Add("Got TUS Data");
            byte[] tusData = TusTss.GetTusData();
            OnScreenLog.Add(" Data size: " + tusData.Length);
            string text = string.Empty;
            for (int i = 0; i < 16 && i < tusData.Length; i++)
            {
                text = text + tusData[i].ToString() + ", ";
            }
            OnScreenLog.Add(" Data: " + text);
            break;
        }
        }
    }