Commit 30bb7e2e by BellCodeEditor

save project

parent 96299d40
Showing with 7 additions and 3 deletions
...@@ -6,6 +6,10 @@ class Hero: ...@@ -6,6 +6,10 @@ class Hero:
self.attack=attack self.attack=attack
yase=Hero("亚瑟",300,20) yase=Hero("亚瑟",300,20)
print(yase.attack) print(yase.attack)
def asd(): def asd(self):
level=self.level+1 yase.level=self.level+1
yase.hp=self.hp+50
yase.attack=selff.attack+4
asd()
asd()
print(yase.hp)
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