Commit 376db15f by BellCodeEditor

save project

parent f8f9b8c5
Showing with 9 additions and 7 deletions
......@@ -23,11 +23,12 @@ class Hero: # 英雄类
class Player(Hero): # 玩家英雄
def __init__(self,name):
def __init__(self,name,hero_type,hp,attack):
super().__init__(name)
self.hp = 99999999999999999999
self.attack = 0.0001
player = Player("后羿")
print("玩家的血量值为:",player.hp)
print("玩家的攻击力为:",player.attack)
self.hp = hp
self.attack = attack
self.hero_type = hero_type
print("名字,类型:",self.name,self.hero)
print(":",player.attack)
player1 = Player("后羿",'射手'24040)
\ 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