events.py 文件源码

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

项目:pixelmek 作者: harbdog 项目源码 文件源码
def on_key_release(self, key, modifiers):
        """This function is called when a key is released.

        'key' is a constant indicating which key was pressed.
        'modifiers' is a bitwise or of several constants indicating which
            modifiers are active at the time of the press (ctrl, shift, capslock, etc.)

        Constants are the ones from pyglet.window.key
        """

        char = pyglet.window.key.symbol_string(key)
        if char in self.keys_pressed:
            self.keys_pressed.remove(char)

        mech = self.battle.getTurnUnit()

        if char == "P":
            mech.sprite.resume()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号