예제 #1
0
파일: Social.cs 프로젝트: ArtReeX/memoria
        public static IEnumerator Cloud_Load(MonoBehaviour owner, Action <byte[], Social.ResponseData.Status> callback)
        {
            global::Debug.Log("in Cloud_Load 1");
            global::Debug.Log("in Cloud_Load 2");
            object result = null;

            Social.ResponseData.Status status = Social.ResponseData.Status.UnknownError;
            byte[] readBytes = null;
            if (Application.platform != RuntimePlatform.IPhonePlayer)
            {
                if (Application.platform != RuntimePlatform.Android)
                {
                    if (Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor)
                    {
                        Social.CoroutineWithData cd = new Social.CoroutineWithData(owner, Social.Steam_Load());
                        yield return(cd.coroutine);

                        result = cd.result;
                    }
                }
            }
            global::Debug.Log("in Cloud_Load 5");
            if (result != null)
            {
                Social.ResponseData resultData = (Social.ResponseData)result;
                if (resultData.m_data != null)
                {
                    readBytes = (byte[])resultData.m_data;
                }
                status = resultData.m_status;
            }
            global::Debug.Log("in Cloud_Load 6");
            callback(readBytes, status);
            yield break;
        }
예제 #2
0
파일: Social.cs 프로젝트: ArtReeX/memoria
        public static IEnumerator Cloud_IsFileExist(MonoBehaviour owner, Action <bool, Social.ResponseData.Status> callback)
        {
            global::Debug.Log("IN CLOUD_ISFILEEXIST1");
            bool isSuccess = false;

            Social.ResponseData.Status status = Social.ResponseData.Status.UnknownError;
            object result = null;

            if (Application.platform != RuntimePlatform.IPhonePlayer)
            {
                if (Application.platform != RuntimePlatform.Android)
                {
                    if (Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor)
                    {
                        Social.CoroutineWithData cd = new Social.CoroutineWithData(owner, Social.Steam_FileExist());
                        yield return(cd.coroutine);

                        result = cd.result;
                    }
                }
            }
            global::Debug.Log("IN CLOUD_ISFILEEXIST3");
            if (result != null)
            {
                Social.ResponseData resultData = (Social.ResponseData)result;
                if (resultData.m_data != null)
                {
                    isSuccess = (bool)resultData.m_data;
                }
                status = resultData.m_status;
            }
            global::Debug.Log("IN CLOUD_ISFILEEXIST4");
            callback(isSuccess, status);
            yield break;
        }
예제 #3
0
파일: Social.cs 프로젝트: ArtReeX/memoria
        public static IEnumerator Cloud_Save(MonoBehaviour owner, byte[] data, TimeSpan playTime, Action <bool, Social.ResponseData.Status> callback)
        {
            bool isSuccess = false;

            Social.ResponseData.Status status = Social.ResponseData.Status.UnknownError;
            object result = null;

            if (Application.platform != RuntimePlatform.IPhonePlayer)
            {
                if (Application.platform != RuntimePlatform.Android)
                {
                    if (Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor)
                    {
                        Social.CoroutineWithData cd = new Social.CoroutineWithData(owner, Social.Steam_Save(data));
                        yield return(cd.coroutine);

                        result = cd.result;
                    }
                }
            }
            if (result != null)
            {
                Social.ResponseData resultData = (Social.ResponseData)result;
                if (resultData.m_data != null)
                {
                    isSuccess = (bool)resultData.m_data;
                }
                status = resultData.m_status;
            }
            callback(isSuccess, status);
            yield break;
        }