public ReturnType Create(ScreenTimer instance, string text, string time) { this.type_time = time; if (this.IsDateTime() == "InvalidTime") { return(ReturnType.TimeIssue); } this.type_text = text; this.isRunning = true; storage.handlers.Add(++storage.count, this); this.key = storage.count; this.Load(instance); instance.SaveData(); return(ReturnType.Created); }
public void HandleEnd() { if (this.type_command != "NoCommandRandomText=jf89ew4u0=03-485=3-24059=3-4059=0-23195=") { ConsoleSystem.Run(ConsoleSystem.Option.Server, this.type_command); } this.type_text = "Timer Ended"; if (this.key == storage.screen) { instance.UpdatePlayerUI(); instance.timer.Once(3f, () => instance.DestroyUI()); } this.isRunning = false; storage.handlers.Remove(this.key); instance.SaveData(); }