Commit 29388e91 by BellCodeEditor

auto save

parent c6d06eb1
Showing with 6 additions and 4 deletions
...@@ -23,10 +23,12 @@ class Hero: # 英雄类 ...@@ -23,10 +23,12 @@ class Hero: # 英雄类
class Player(Hero): # 玩家英雄 class Player(Hero): # 玩家英雄
def __init__(self,name): def __init__(self,name,i):
super().__init__(name) super().__init__(name)
self.h=230 self.h=230
self.a=60 self.a=60
player = Player("后羿") self.i=i
print("玩家的血量值为:",player.h) print("玩家的血量值为:",self.h)
print("玩家的攻击力为:",player.a) print("玩家的攻击力为:",self.a)
player = Player("后羿",'ss')
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