Commit 8c6dcd0d by BellCodeEditor

save project

parent 26e376d0
Showing with 1 additions and 1 deletions
# 英雄角色类
class Hero(object):
def __init__(self,name):
self.level = 1
self.hp = 300
self.attack = 30
self.name = name
......@@ -21,6 +20,7 @@ class Player(Hero):
super().__init__(name)
self.hp=200
self.attack=60
print("英雄的名称,血量,攻击力分别为",self.name,self.hp.self.attack)
gui = Player("鬼谷子")
yase = Hero("垭瑟")
#houyi= Hero("后羿")
......
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