Python: self variable in a class doesn't update under certain circumstances

前端 未结 0 1836
醉酒成梦
醉酒成梦 2020-12-02 01:48

I am trying to change a variable inside of a class from a method inside that class. Code:

    def takeDamage(self, damageTaken):
        self.cur_health -= da         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题