Commit 8a45e4c3 by BellCodeEditor

save project

parent 61b54a9f
Showing with 8 additions and 6 deletions
...@@ -4,9 +4,11 @@ class Hero: ...@@ -4,9 +4,11 @@ class Hero:
self.name=name self.name=name
self.hp=300 self.hp=300
self.attack=attack self.attack=attack
yese=Hero("垭瑟",300,20) def fun(self):
self.level+=1
self.hp+=50
self.attack+=20
yase=Hero("垭瑟",300,20)
houyi=Hero("后羿",240,23) houyi=Hero("后羿",240,23)
def fun(): yase.fun()
yase.level+=1 print(yase.hp)
yese.hp+=50 \ No newline at end of file
yese.attack+=20
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment