using System.Collections; using System.Collections.Generic; using UnityEngine; using Steamworks; using Assets.Scripts; public class SteamWorksHandler : MonoBehaviour { /* Steam Achievements * FORMAT = Requirement: Message * (Currently dropped) Playing for 5 hours: Got nothing else to do? * (Currently dropped) Playing for 10 hours: Look at THAT sunset! * (Currently dropped) Playing for 20 hours: You want coffee to your bagel? * (Currently dropped) Playing for 40 hours: I guess I have a true fan here * (Currently dropped) Playing for 80 hours: You should consider going outside */ static int counterForest = 0; public static void getForestAchievement(string tiletype) { if (counterForest != -1 && !isGodMode()) { if (tiletype == "Forest") { counterForest++; } else { counterForest = 0; } if (counterForest >= 5) { SteamUserStats.SetAchievement("ForestAchievement"); counterForest = -1; } } } public static void getStandardAchievement(string name) { if (!isGodMode()) { SteamUserStats.SetAchievement(name); } } public static void getSlimeAchievement(int killcount) { string name = ""; switch (killcount) { case 1: name = "Kill1Slime"; break; case 10: name = "Kill10Slime"; break; case 50: name = "Kill50Slime"; break; case 100: name = "Kill100Slime"; break; case 500: name = "Kill500Slime"; break; case 1000: name = "Kill1000Slime"; break; } if (!isGodMode()) { SteamUserStats.SetAchievement(name); } } private static bool isGodMode() { return EasterEggHandler.isGodMode(GameObject.Find("Player").GetComponent()); } }