main.py 文件源码

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

项目:zipper 作者: richarddun 项目源码 文件源码
def __init__(self,pos,mapz):
        super(Player_Sprite,self).__init__(pos=pos,size=(195,164))
        #  (pos=pos, size=(192,81),*kwargs)
        self.mov_images = Atlas(os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','movement','animatlas.atlas')))
        self.atk_images = Atlas(os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','attack','atk.atlas')))
        self.spe_images = Atlas(os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','special','specatlas.atlas')))
        self.wall_images = Atlas(os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','special','wall_anim','wall.atlas')))
        self.animage = Atlas(os.path.abspath(os.path.join(os.path.dirname('__file__'),'animation','effects','arrow.atlas')))
        self.map = mapz
        self.texture = self.mov_images['walk_2_right']
        self.moving_right = False
        self.resting = False
        self.moving_left = False
        self.movyval = 0
        self.suspended = 0
        self.jumping = False
        self.animlen = 0
        self.animduration = .08
        self.prevdir = 'right'
        self.atkcounter = 0
        self.touching = False
        self.perma_x = self.map.map.view_w / 2
        self.perma_y = self.map.map.view_y / 2
        self.skew_x_touch, self.skew_y_touch = 0,0
        self.zipping = False
        self.sticking = False
        self.coldir = 'n'
        self.bearing = 90
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号