Commit 695692c6 by BellCodeEditor

save project

parent 69b5dc67
Showing with 10 additions and 1 deletions
......@@ -20,7 +20,16 @@ class Hero: # 英雄类
info = info1+info2+info3
print(info)
exit()
class Player(Here) :
def __init__(self,name,hero_type):
super(Player,self).__init__(name)
self.hp = 200
self.attack = 50
self.hero_type = hero_type
print("角色"+self.name+"创建陈工,yongwsdjksf9y",self.hero_type)
print("当前等级,血量,攻击力分别为:",self.level,self.hp,self.attack)
houyi = Player("后裔","射手")
yase = Hero("亚瑟")
class Player(Hero): # 玩家英雄
def __init__(self,name):
......
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