Commit d98970cb by BellCodeEditor

save project

parent b7485648
Showing with 6 additions and 6 deletions
......@@ -18,18 +18,17 @@ class Hero(object):
class player(Hero):
def __init__(self, name):
super().__init__(name)
def __init__(self,name,h_t):
super(player,self).__init__(name)
self.hp = 200
self.attack = 110
self.h_t = h_t
player = player ('后羿','射手')
print('角色'+self.name+'创建成功,英雄类型为:',self.h_t)
print('当前等级,攻击力,血量为:',self.level,self.attack,self.hp)
print('角色'+self.name+'创建成功,英雄类型为:',self.h_t)
print('当前等级,攻击力,血量为:',self.level,self.attack,self.hp)
h = player ('后羿','射手')
h = player('后羿','射手')
y = Hero('亚瑟')
\ No newline at end of file
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