Commit b9f97c1f by BellCodeEditor

save project

parent a33d2757
Showing with 6 additions and 6 deletions
......@@ -23,13 +23,13 @@ class Hero: # 英雄类
class Player(Hero): # 玩家英雄
def __init__(self,name):
super().__init__(name)
def __init__(self,name,hero_type):
super(Player,self).__init__(name)
self.hp = 200
self.attack = 50
self.hero_tyep = hero_tyep
print('js'+self.name+'cjcg,yxlxw:',self.hero_tyep)
self.hero_type = hero_type
print('js'+self.name+'cjcg,yxlxw:',self.hero_type)
print("懒得写了",self.level,self.hp,self.attack)
player = Player("后羿")
houyi = Player("后羿","ss")
yase = Hero("ys")
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