public void StartFlow() { if (FlowManager.CurrentFlow == "") { throw new Exception("Before you can start the flow sequence\nA flow must be loaded and activated"); } switch (SBubble.RunMode) { case "CB": FlowManager.GoHardFlow(FlowCallBack.me); break; case "RF": FlowManager.GoHardFlow(FlowRepeat.me); break; default: throw new Exception($"Unknown runmode ({SBubble.RunMode})"); } }
static public void GoError(string ct, string message, string trace) { blocked = true; BubConsole.WriteLine($"ERROR>{message}", 255, 0, 0); Debug.WriteLine($"{ct}: {message}\nTraceback:\n{trace}\n\n"); if (crashed) { return; } crashed = true; var s = QuickStream.OpenEmbedded("Death.png"); if (s == null) { Debug.WriteLine("ERROR! Trying to read Death resulted into null!"); } s.Position = 0; Death = TQMG.GetImage(s); sct = ct; smsg = message; strace = trace; FlowManager.GoHardFlow(new Error(), true); }