Commit cbbf8876 by BellCodeEditor

save project

parent 38b84b17
Showing with 8 additions and 4 deletions
# 英雄角色类 # 英雄角色类`
class Hero(object): class Hero(object):
def __init__(self, name): def __init__(self, name):
self.level = 1 self.level = 1
...@@ -18,5 +18,10 @@ class Hero(object): ...@@ -18,5 +18,10 @@ class Hero(object):
yase = Hero("垭瑟") yase = Hero("垭瑟")
houyi= Hero("后羿") class p(Hero):
yase.combat(houyi) def_init_(self,name):
\ No newline at end of file self.level = 1
self.hp = 3000
self.attack = 455
self.name = name
houyi
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