public void CommandInput(string s) { s = s.ToLowerInvariant(); switch (s) { case "example": if (OnExampleEvent != null) { OnExampleEvent.Invoke(); } break; case "fps": if (OnFPSDebugToggle != null) { OnFPSDebugToggle.Invoke(); } break; } }
// OnExampleEvent?.Invoke(); public static void ExampleEvent() { OnExampleEvent?.Invoke(); }