Commit 953bcad1 by BellCodeEditor

save project

parent f32a501f
Showing with 5 additions and 2 deletions
...@@ -26,6 +26,8 @@ class player(hero): ...@@ -26,6 +26,8 @@ class player(hero):
def__init__(self,name) def__init__(self,name)
super().__init__(name) super().__init__(name)
self.hp=200 self.hp=200
self.attack self.attack=50
print("玩家的血量值为:"player.hp) self.hero_trpe=hero_trp
print("角色"+self.name+"创建成功")
houyi=player("后羿","射手")
\ 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