Commit 7c2834bf by BellCodeEditor

auto save

parent d215e0bb
Showing with 13 additions and 7 deletions
...@@ -19,13 +19,19 @@ class Hero(object): ...@@ -19,13 +19,19 @@ class Hero(object):
info=info1+info2+info3 info=info1+info2+info3
print(info) print(info)
exit() exit()
yase = Hero("垭瑟") class player(Hero):
houyi= Hero("后羿") def __init__(self,name)
yase.combat(houyi) super.__init__()
yase.combat(houyi) self.hp=200
self.attack=50
self.horo_type=horo_type
print("角色"+self.name+"创建成功,英雄角色为",self.hore_type)
print("当前等级,血量,攻击力为:",self.level,self.hp,self.attack)
player= player("后羿")
print("玩家血量为:",player.hp)
print("玩家攻击为:",player.attack)
houyi=Player("后羿","射手")
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