forked from Ale-XYX/Rects-Fight
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RectsFight.py
41 lines (36 loc) · 1.1 KB
/
RectsFight.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# CLIENT
if __name__ == '__main__':
import sys
import subprocess
import time
print('Loading Rects Fight V2.0...', end='', flush=True)
# Check if pygame is installed, if not install pygame
# If os is not windows, then tell to manually install
if str(sys.platform) == 'win32':
try:
import pygame
except ModuleNotFoundError:
print('X')
print('Pygame is not installed! Installing...')
subprocess.call(['py', '-m', 'pip', 'install', 'pygame'])
print('Finished, continuing...')
import pygame
else:
try:
import pygame
except ModuleNotFoundError:
print('YOU ARE USING LINUX/MAC, PLEASE INSTALL PYGAME MANUALLY')
time.sleep(3)
sys.exit()
# Import Game Module [Which Loads Sprites, Global, Media, etc.]
sys.path.insert(0, './data')
import game
print('Done')
pygame.init()
pygame.init()
game.title_screen()
game.mode_select()
game.char_select()
while game.globals.superloop:
game.main()
pygame.quit()