from tkinter import messagebox |
import time |
#游戏健康系统 |
def ExitGame(): |
from tkinter import messagebox |
ansTime_Now = time.asctime() |
#print(ansTime_Now) |
if ansTime_Now > "21:00:00" and ansTime_Now < = "0:00" : |
messagebox.showwarning( "游戏健康系统" , "您的游戏时间已到,请退出游戏。\n谢谢配合!" ) |
#pygame.quit() |
#sys.exit() |
else : |
if ansTime_Now > "20:00:00" and ansTime_Now < = "21:00" : |
#messagebox.showwarning("游戏健康系统","您可以继续玩。") |
pass |
else : |
messagebox.showwarning( "游戏健康系统" , "根据国家游戏健康管理规定\n现在未到游戏时间,请退出游戏。\n谢谢配合!" ) |
#pygame.quit() |
#sys.exit() |
|
ExitGame() |
exit() |
初级程序员
by: vvvv 发表于:2021-12-15 14:58:54 顶(0) | 踩(0) 回复
666
回复评论