Commit 729b2ab1 by BellCodeEditor

save project

parent 4343fa09
Showing with 5 additions and 2 deletions
...@@ -20,9 +20,11 @@ class Hero(object): ...@@ -20,9 +20,11 @@ class Hero(object):
print(info) print(info)
exit() exit()
class Player(Hero): class Player(Hero):
def __init__(self,name): def __init__(self,name,Hero_txpe):
super().__init__(name) super(Player).__init__(name)
self.hp = 200 self.hp = 200
self.attack = 50 self.attack = 50
self.hero_txpe=hero_txpe
print("角色"+self.name+"创建成功,英雄类型为"+self.level,self.hp,self.attack)
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") houyi= Hero("后羿")
\ 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