//also used to go there in the first place :D public void Return(string input) { switch (input) { case "fromMain": { OnOptions?.Invoke(); mainMenu.SetActive(false); pauseMenu.SetActive(false); optionsMenu.SetActive(true); } break; case "fromOptions": { OnMain?.Invoke(); if (pauseMode) { pauseMenu.SetActive(true); optionsMenu.SetActive(false); } else { mainMenu.SetActive(true); optionsMenu.SetActive(false); } } break; } }
private void handleRequest(HttpListenerContext context) { var eventArgs = new HttpEventArgs(context.Request, context.Response); var method = context.Request.HttpMethod; try { if (method == HttpMethod.Get.Method) { OnGet?.Invoke(this, eventArgs); } else if (method == HttpMethod.Post.Method) { OnPost?.Invoke(this, eventArgs); } else if (method == HttpMethod.Put.Method) { OnPut?.Invoke(this, eventArgs); } else if (method == HttpMethod.Options.Method) { OnOptions?.Invoke(this, eventArgs); } } catch (NotImplementedException) { context.Response.Abort(); } }
public void PressOptions() { OnOptions?.Invoke(); Hide(); }