Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private Boolean IsGameRunning()
- {
- Process[] game = Process.GetProcesses();
- foreach (Process process in game)
- {
- if (process.ProcessName.Contains("GameWindow"))
- {
- return true;
- }
- }
- return false;
- }
- if (IsGameRunning())
- {
- Do stuff
- }
- else
- {
- Status("Waiting for game to start");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement