示例#1
0
文件: timer.py 项目: andie23/_Puzzled
 def setTimer(self, time, func, *args, **kwargs):
     instanceObj = self._addInstance()
     self.timerLimit = time
     self.callback = lambda: func(*args, **kwargs)
     self.instanceObj = instanceObj
     self._setGlobals()
     Clock.__init__(self, instanceObj)
示例#2
0
文件: timer.py 项目: andie23/_Puzzled
 def load(self):
     instance = logic.globalDict['timer_instances'][self.id]
     self.sceneId = instance['scene_id']
     self.callback = instance['callback']
     self.scene = Scene(self.sceneId).getscene()
     self.timerLimit = instance['time_limit']
     self.instanceObj = ObjProperties().getObjByPropVal(
         'instance_id', self.id, self.scene.objects)
     Clock.__init__(self, self.instanceObj)
示例#3
0
文件: reminder.py 项目: dani888/cs110
	def __init__(self):
		"""
		passes in self for all varaibles into Reminder class
		initializing all the instance variable
		"""
		t = time.localtime()[:6]   # t = (year, month, day, hour, min, sec)
		Clock.__init__(self, t[3], t[4], t[5])
		Calendar.__init__(self, t[1], t[2], t[0])
		self.events = []
		self.interact()
示例#4
0
    def __init__(self,screen,bgcolor):
        screenHeight = screen.get_height()
        screenWidth = screen.get_width()
        targetHeight = HDMIClock.defaultHeight * screenHeight

        Clock.__init__(self,targetHeight,HDMIClock.defaultColor)

        width = self.clockFace.get_width()
        height = self.clockFace.get_height()

        self.dimensions = pygame.Rect((screenWidth-width)/2,(screenHeight-height)/2,width,height)
        self.screen = screen
        self.bgcolor = bgcolor
示例#5
0
 def __init__(self, day, month, year, hours=0, minutes=0, seconds=0):
     Calander.__init__(self, day, month, year)
     Clock.__init__(self, hours, minutes, seconds)
 def __init__(self, day, month, year, hour, minute, second):
     Clock.__init__(self, hour, minute, second)
     Calendar.__init__(self, day, month, year)
示例#7
0
 def __init__(self, day, month, year, hour, minute, second):
     Clock.__init__(self, hour, minute, second)
     Calendar.__init__(self, day, month, year)
示例#8
0
 def __init__(self, day, month, year, hour, minute, second):
     Clock.__init__(self, hour, minute, second)
     Calendar.__init__(self, day, month, year)
     print("wilson: {}".format(type(self).__name__))
 def __init__(self, day, month, year, hours=0, minutes=0, seconds=0):
     Calendar.__init__(self, day, month, year)
     Clock.__init__(self, hours, minutes, seconds)
示例#10
0
 def __init__(self,op=2):
     Clock.__init__(self,op=2)
     self.createGUI()
示例#11
0
 def __init__(self, day, month, year, hours, minutes, seconds):
     Clock.__init__(self, hours, minutes, seconds)
     Calendar.__init__(self, day, month, year)