Commit 999ad545 by BellCodeEditor

save project

parent 96ad9294
Showing with 2 additions and 2 deletions
......@@ -23,12 +23,12 @@ class Hero: # 英雄类
class Player(Hero): # 玩家英雄
def __init__(self,name):
def __init__(self,name,hero_type):
super(). _init_(name)
self.hp=300
self.attack=200
self.hero_type=hero_type
print("英雄"+self.name,"创建成功,英雄类型为",self.hero_type)
print("英雄"+self.name+"创建成功,英雄类型为",self.hero_type)
print("攻击力","血量","等级",self.attack,self.hp,self.leve)
player = 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