コード例 #1
0
ファイル: Social.cs プロジェクト: ArtReeX/memoria
 public static void Authenticate(Boolean needToResyncSystemAchievement = false)
 {
     global::Debug.Log("KF: Social.Authenticate _hasCreated = " + Social._hasCreated);
     if (!Social._hasCreated || Application.isEditor)
     {
         return;
     }
     global::Debug.Log("BEFORE calling SteamSdkWrapper.SetSendAchievementToCS(SendAchievementToCS)");
     unsafe
     {
         SteamSdkWrapper.SetSendAchievementToCS(new Social.SendAchievementToCSCallback(Social.SendAchievementToCS));
     }
     global::Debug.Log("AFTER calling SteamSdkWrapper.SetSendAchievementToCS(SendAchievementToCS)");
     UnityEngine.Social.localUser.Authenticate(delegate(Boolean success)
     {
         global::Debug.Log("KF: authenticate's callback success = " + success);
         if (success)
         {
             global::Debug.Log("KF: PAUSE: authen succuessful");
             Social.m_isAuthenticated = true;
             if (needToResyncSystemAchievement)
             {
                 global::Debug.Log("Calling ResyncSystemAchievements after the first authentication");
                 AchievementManager.ResyncSystemAchievements();
             }
         }
         else
         {
             Social.m_isAuthenticated = false;
         }
     });
 }
コード例 #2
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public void ProcessCallbacks()
 {
     if (this.Initialized)
     {
         SteamSdkWrapper.ProcessCallbacks_Internal();
     }
 }
コード例 #3
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public void Shutdown()
 {
     if (this.Initialized)
     {
         SteamSdkWrapper.Shutdown_Internal();
     }
 }
コード例 #4
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 private static void DispatchAchievementStoredEvent()
 {
     if (SteamSdkWrapper.OnAchievementStored != null)
     {
         SteamSdkWrapper.OnAchievementStored(true);
         SteamSdkWrapper.OnAchievementStored = null;
     }
 }
コード例 #5
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 private static void DispatchStatsStoredEvent(Boolean result)
 {
     if (SteamSdkWrapper.OnStatsStored != null)
     {
         SteamSdkWrapper.OnStatsStored(result);
         SteamSdkWrapper.OnStatsStored = null;
     }
 }
コード例 #6
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public void Authenticate(Action <Boolean> callback)
 {
     SteamSdkWrapper.OnStatsReceived = callback;
     SteamSdkWrapper.RegisterStatsReceivedCallback(new SteamSdkWrapper.ResultCallbackDelegate(SteamSdkWrapper.DispatchStatsReceivedEvent));
     SteamSdkWrapper.RegisterStatsStoredCallback(new SteamSdkWrapper.ResultCallbackDelegate(SteamSdkWrapper.DispatchStatsStoredEvent));
     SteamSdkWrapper.RegisterAchievementStoredCallback(new SteamSdkWrapper.VoidCallbackDelegate(SteamSdkWrapper.DispatchAchievementStoredEvent));
     this.Initialized = SteamSdkWrapper.Init();
 }
コード例 #7
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 private static void DispatchStatsReceivedEvent(Boolean result)
 {
     if (SteamSdkWrapper.OnStatsReceived != null)
     {
         SteamSdkWrapper.AchievementReady = result;
         SteamSdkWrapper.OnStatsReceived(result);
         SteamSdkWrapper.OnStatsReceived = null;
     }
 }
コード例 #8
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
    public static Boolean UpdateStatProgress(String statId, Int32 rawProgress)
    {
        if (!SteamSdkWrapper.AchievementReady)
        {
            global::Debug.LogWarning("Invalid Operation Trigger Achievement: Achievement system is not ready");
            return(false);
        }
        IntPtr  intPtr = Marshal.StringToHGlobalAnsi(statId);
        Boolean result = SteamSdkWrapper.UpdateStatProgress_Internal(intPtr, rawProgress);

        Marshal.FreeHGlobal(intPtr);
        return(result);
    }
コード例 #9
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
    public Boolean IsCloudEnabled()
    {
        if (!this.Initialized)
        {
            global::Debug.LogWarning("Invalid Operation Clear Achievement: please initialize SDK");
            return(false);
        }
        if (!SteamSdkWrapper.AchievementReady)
        {
            global::Debug.LogWarning("Invalid Operation Clear Achievement: Achievement system is not ready");
            return(false);
        }
        Boolean flag = SteamSdkWrapper.IsCloudEnabled_Internal();

        global::Debug.Log("IsCloudEnabled_Internal() => " + flag);
        return(flag);
    }
コード例 #10
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
    public Boolean ClearAchievement(String achievementId)
    {
        if (!this.Initialized)
        {
            global::Debug.LogWarning("Invalid Operation Clear Achievement: please initialize SDK");
            return(false);
        }
        if (!SteamSdkWrapper.AchievementReady)
        {
            global::Debug.LogWarning("Invalid Operation Clear Achievement: Achievement system is not ready");
            return(false);
        }
        IntPtr  intPtr = Marshal.StringToHGlobalAnsi(achievementId);
        Boolean result = SteamSdkWrapper.ClearAchievement_Internal(intPtr);

        Marshal.FreeHGlobal(intPtr);
        return(result);
    }
コード例 #11
0
ファイル: Social.cs プロジェクト: ArtReeX/memoria
        public static void InitializeSocialPlatform()
        {
            global::Debug.Log(String.Concat(new Object[]
            {
                "KF: InitializeSocialPlatform _hasCreated = ",
                Social._hasCreated,
                ", IsEnabled = ",
                true
            }));
            if (Social._hasCreated || Application.isEditor || false)
            {
                return;
            }
            SteamSdkWrapper steamSdkWrapper = SteamSdkWrapper.Create();

            steamSdkWrapper.Activate();
            Social.steamAchievementData = new SteamAchievementData[87];
            Social._hasCreated          = true;
        }
コード例 #12
0
    private void Awake()
    {
        global::Debug.Log("10 BundleSceneSelector.Awake");
        Boolean flag = false;

        String[] files = Directory.GetFiles("./", "*steam_appid.txt", SearchOption.AllDirectories);
        String[] array = files;
        for (Int32 i = 0; i < (Int32)array.Length; i++)
        {
            String   fileName = array[i];
            FileInfo fileInfo = new FileInfo(fileName);
            if (fileInfo.IsReadOnly)
            {
                fileInfo.IsReadOnly = false;
            }
            fileInfo.Delete();
        }
        if (SteamSdkWrapper.SteamAPIRestartAppIfNecessary())
        {
            Application.Quit();
            return;
        }
        if (Application.platform == RuntimePlatform.IPhonePlayer || flag)
        {
            if (BundleSceneIOS.Are3CompressedBundlesCached())
            {
                global::Debug.Log("All 3 compressed bundles are cachaed. Go to SplashScreen");
                Application.LoadLevel("SplashScreen");
            }
            else
            {
                global::Debug.Log("Some compressed bundles are NOT cached. Go to Bundle-iOS");
                Application.LoadLevel("Bundle-iOS");
            }
        }
        else
        {
            Application.LoadLevel("SplashScreen");
        }
    }
コード例 #13
0
ファイル: Social.cs プロジェクト: ArtReeX/memoria
 public static void UpdateStatSteam(String statId, Int32 rawProgress, Action <Boolean> callback)
 {
     SteamSdkWrapper.UpdateStatProgress(statId, rawProgress, callback);
 }
コード例 #14
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public static void UpdateStatProgress(String statToUpdate, Int32 progress, Action <Boolean> callback)
 {
     SteamSdkWrapper.OnStatsStored = callback;
     SteamSdkWrapper.UpdateStatProgress(statToUpdate, progress);
 }
コード例 #15
0
ファイル: SteamSdkWrapper.cs プロジェクト: ArtReeX/memoria
 public static void RequestStats(Action <Boolean> callback)
 {
     SteamSdkWrapper.OnStatsReceived = callback;
     SteamSdkWrapper.RequestStats();
 }
コード例 #16
0
 public SteamLocalUser(SteamSdkWrapper steamSdkWrapper)
 {
     this.steamSdkWrapper = steamSdkWrapper;
 }