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; } }); }
public void ProcessCallbacks() { if (this.Initialized) { SteamSdkWrapper.ProcessCallbacks_Internal(); } }
public void Shutdown() { if (this.Initialized) { SteamSdkWrapper.Shutdown_Internal(); } }
private static void DispatchAchievementStoredEvent() { if (SteamSdkWrapper.OnAchievementStored != null) { SteamSdkWrapper.OnAchievementStored(true); SteamSdkWrapper.OnAchievementStored = null; } }
private static void DispatchStatsStoredEvent(Boolean result) { if (SteamSdkWrapper.OnStatsStored != null) { SteamSdkWrapper.OnStatsStored(result); SteamSdkWrapper.OnStatsStored = null; } }
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(); }
private static void DispatchStatsReceivedEvent(Boolean result) { if (SteamSdkWrapper.OnStatsReceived != null) { SteamSdkWrapper.AchievementReady = result; SteamSdkWrapper.OnStatsReceived(result); SteamSdkWrapper.OnStatsReceived = null; } }
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); }
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); }
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); }
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; }
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"); } }
public static void UpdateStatSteam(String statId, Int32 rawProgress, Action <Boolean> callback) { SteamSdkWrapper.UpdateStatProgress(statId, rawProgress, callback); }
public static void UpdateStatProgress(String statToUpdate, Int32 progress, Action <Boolean> callback) { SteamSdkWrapper.OnStatsStored = callback; SteamSdkWrapper.UpdateStatProgress(statToUpdate, progress); }
public static void RequestStats(Action <Boolean> callback) { SteamSdkWrapper.OnStatsReceived = callback; SteamSdkWrapper.RequestStats(); }
public SteamLocalUser(SteamSdkWrapper steamSdkWrapper) { this.steamSdkWrapper = steamSdkWrapper; }