protected void DebounceTimerIntervalOnTick(object state) { DebounceTimerInterval?.Dispose(); if (DebounceTimerInterval != null) { DebounceAction?.Invoke(LastObjectDebounced); } DebounceTimerInterval = null; }
public QuestManager() { var every = TimeSpan.FromSeconds(3); DebounceSave = new DebounceAction(every, Save); quests.Add(new Quest { Id = "get-timetable", Title = "Speak to Naomi", Description = "Naomi has asked me to speak to her next to the student services stall", NotificationText = "Open your backpack to view your timetable" }); quests.Add(new Quest { Id = "visit-leech", Title = "Visit Engineering Leech", Description = "I should go to the engineering leech to speak to the instructors", NotificationText = "You made it to Engineering Leech!" }); quests.Add(new Quest { Id = "software-workshop", Title = "Software Workshop", Description = "The software instructor is waiting for me at the software workshop", NotificationText = "You finished the Software workshop!" }); quests.Add(new Quest { Id = "electrical-workshop", Title = "Electrical Workshop", Description = "The electrical instructor is waiting for me at the electrical workshop", NotificationText = "You finished the Electrical workshop!" }); quests.Add(new Quest { Id = "civil-workshop", Title = "Civil Workshop", Description = "The civil instructor is waiting for me at the civil workshop", NotificationText = "You finished the Civil workshop!" }); quests.Add(new Quest { Id = "post-workshops-trigger" }); quests.Add(new Quest { Id = "networking", Title = "Networking Event", Description = "Speak to undergraduates and industry professionals", NotificationText = "Speak to Naomi for a prize, or keep talking to other students" }); quests.Add(new Quest { Id = "collect-prize", Title = "Speak to Naomi", Description = "Head to the engineering lobby to claim your prize", NotificationText = "Check your backpack for your prize!" }); quests.Add(new Quest { Id = "free-roam", Title = "You're done!", Description = "Feel free to revisit the stalls and chat with others" }); }
public GameManager() { var every = TimeSpan.FromSeconds(1); DebounceSaveSettings = new DebounceAction(every, SaveSettings); }
public Hiscores() { var every = TimeSpan.FromSeconds(3); DebounceSave = new DebounceAction(every, Save); }
public AchievementsManager() { var every = TimeSpan.FromSeconds(3); DebounceSave = new DebounceAction(every, Save); // Add achievements here List.Add(new Achievement { Id = "timetable", Title = "Pick Up Your Timetable!", Description = "You need to know where to be, don't want to miss anything related to this great day!" }); List.Add(new Achievement { Id = "talk-to-student", Title = "Talk to a prospective student!", Description = "Wow, there's a lot of other girls here like me! I wonder what they think of today?" }); List.Add(new Achievement { Id = "complete-workshop", Title = "Complete a workshop!", Description = "Those workshops look really interesting, I should try one out!" }); List.Add(new Achievement { Id = "complete-all-workshops", Title = "Complete all workshops!", Description = "Wow, look at the variety of workshops I could try out!" }); List.Add(new Achievement { Id = "find-lecturer", Title = "Find a lecturer!", Description = "I really want to know more about engineering, someone who teaches it would be the way to go!" }); List.Add(new Achievement { Id = "speak-undergrad", Title = "Speak to an undergraduate student!", Description = "I wonder what being a student at the University of Auckland would be like?" }); List.Add(new Achievement { Id = "master-workshop", Title = "Master a workshop!", Description = "I wonder how hard it is to pass all the levels?" }); List.Add(new Achievement { Id = "master-all-workshops", Title = "Master all workshops!", Description = "I wonder how difficult it would be to pass all the levels of every game?" }); // Load state after adding achievements Load(); }