Commit 18b15999 by BellCodeEditor

save project

parent 013c93bb
Showing with 5 additions and 2 deletions
......@@ -20,11 +20,14 @@ class Hero: # 英雄类
print(info)
exit()
class Player(): # 玩家英雄
def __init__(self,name):
class Player(Hero): # 玩家英雄
def __init__(self,name,hero_type):
super().__init__(name)
slef.hp = 200
self.attack = 50
self.hore_type = hore_type
print('角色'+self.name+'类型',self.hero_type)
print('级,血,攻为',self.lvel,self.hp,self.attack)
player = Player("后羿")
print("玩家的血量值为:",player.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