def __init__(self,**kwargs):
self.baseimg = os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','effects','enbar_noback.png'))
self.hpimg = os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','effects','hbar.png'))
self.mpimg = os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','effects','mpbar.png'))
super(ZippyGame,self).__init__(**kwargs)
tempscale = Window.height / 256.
self.map = BaseMap(os.path.abspath(os.path.join(os.path.dirname('__file__'),'Maps','prototype1','16px-680x800-metal.tmx')),
Window.size,tempscale)
spawn = self.map.map.layers['start'].find('spawn')[0]
self.zipmeter = ZipMeter()
self.sprite = Player_Sprite((spawn.px,spawn.py),self.map)
self.add_widget(self.map)
self.map.add_widget(self.sprite)
self.add_widget(self.zipmeter)
Clock.schedule_interval(self.update, 1.0/60.0)
评论列表
文章目录