ontology.py 文件源码

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

项目:gym_vgdl 作者: EndingCredits 项目源码 文件源码
def _shoot(self, game):
        from pygame.locals import K_SPACE
        if self.stype and game.keystate[K_SPACE]:
            u = unitVector(self.orientation)
            newones = game._createSprite([self.stype], (self.lastrect.left + u[0] * self.lastrect.size[0],
                                                       self.lastrect.top + u[1] * self.lastrect.size[1]))
            if len(newones) > 0  and isinstance(newones[0], OrientedSprite):
                newones[0].orientation = unitVector(self.orientation)
            self._reduceAmmo()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号