Commit 745741d1 by BellCodeEditor

save project

parent 42f792e2
Showing with 3 additions and 2 deletions
......@@ -23,10 +23,11 @@ class Hero: # 英雄类
class Player(Hero): # 玩家英雄
def __init__(self,name):
super(Player,SELF).__init__(name)
def __init__(self,name,Hero_trpe):
super().__init__(name)
self.hp=1000
self.attack=50
self.Hero_trpe=Hero_trpe
print("角色"+self.name+"创建成功,英雄类型为:",self.Hero_trpe)
print("当前等级,血量,攻击力分别为:",self.level,self.hp,self.attack)
gui = Player("鬼","妖怪")
......
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