main.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:zipper 作者: richarddun 项目源码 文件源码
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)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号