diff options
| author | chai <215380520@qq.com> | 2024-05-19 16:46:27 +0800 |
|---|---|---|
| committer | chai <215380520@qq.com> | 2024-05-19 16:46:27 +0800 |
| commit | 8b1fc7063b387542803c6bc214ccf8acb32870bd (patch) | |
| tree | d310eb99872c8215f1c1f67731ec21f0915cd778 /Thronefall_1_0/GameCode/AchievementManager.cs | |
| parent | 8e13e7e2874adc8982e16d1d2ed2e28d7480b45f (diff) | |
* rename
Diffstat (limited to 'Thronefall_1_0/GameCode/AchievementManager.cs')
| -rw-r--r-- | Thronefall_1_0/GameCode/AchievementManager.cs | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/Thronefall_1_0/GameCode/AchievementManager.cs b/Thronefall_1_0/GameCode/AchievementManager.cs deleted file mode 100644 index 0cedf23..0000000 --- a/Thronefall_1_0/GameCode/AchievementManager.cs +++ /dev/null @@ -1,78 +0,0 @@ -using System; -using Steamworks; -using UnityEngine; - -public class AchievementManager : MonoBehaviour -{ - public enum Achievements - { - START_TUTORIAL, - COMPLETE_TUTORIAL, - NORDFELS_BEATEN, - NORDFELS_QUESTSCOMPLETE, - DURSTSTEIN_BEATEN, - DURSTSTEIN_QUESTSCOMPLETE, - FROSTSEE_BEATEN, - FROSTSEE_QUESTSCOMPLETE, - MAXLEVEL_REACHED - } - - public static void UnlockAchievement(Achievements _achievement) - { - if (SteamManager.Initialized) - { - SteamUserStats.SetAchievement(_achievement.ToString()); - } - } - - public static void ResetAllAchievements() - { - if (!Application.isPlaying) - { - Debug.LogWarning("Warning: Resetting achievements only works while in play mode."); - return; - } - string[] names = Enum.GetNames(typeof(Achievements)); - for (int i = 0; i < names.Length; i++) - { - SteamUserStats.ClearAchievement(names[i]); - } - } - - public static void LevelBeaten(string _scene) - { - if (_scene == "Neuland(Tutorial)") - { - UnlockAchievement(Achievements.START_TUTORIAL); - UnlockAchievement(Achievements.COMPLETE_TUTORIAL); - } - if (_scene == "Nordfels") - { - UnlockAchievement(Achievements.NORDFELS_BEATEN); - } - if (_scene == "Durststein") - { - UnlockAchievement(Achievements.DURSTSTEIN_BEATEN); - } - if (_scene == "Frostsee") - { - UnlockAchievement(Achievements.FROSTSEE_BEATEN); - } - } - - public static void LevelAllQuestsComplete(string _scene) - { - if (_scene == "Nordfels") - { - UnlockAchievement(Achievements.NORDFELS_QUESTSCOMPLETE); - } - if (_scene == "Durststein") - { - UnlockAchievement(Achievements.DURSTSTEIN_QUESTSCOMPLETE); - } - if (_scene == "Frostsee") - { - UnlockAchievement(Achievements.FROSTSEE_QUESTSCOMPLETE); - } - } -} |
