Advertisement
Guest User

Untitled

a guest
Jul 10th, 2014
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. private Boolean IsGameRunning()
  2. {
  3. Process[] game = Process.GetProcesses();
  4. foreach (Process process in game)
  5. {
  6. if (process.ProcessName.Contains("GameWindow"))
  7. {
  8. return true;
  9. }
  10. }
  11. return false;
  12. }
  13.  
  14. if (IsGameRunning())
  15. {
  16. Do stuff
  17. }
  18. else
  19. {
  20.  
  21. Status("Waiting for game to start");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement