Commit 4c3aea57 by BellCodeEditor

save project

parent f5913059
Showing with 6 additions and 14 deletions
# 英雄角色类 def sum(meney):
class Hero(object): count=0
def __init__(self, level,hp,attack,name): for i in money:
self.level = level count=count+1
self.hp = hp return count
self.attack = attack \ No newline at end of file
self.name = name
def upgrade():
self.level = self.level +1
self.hp = self.hp +50
self.attack = self.attack +4
yase = Hero(1,300,20,'yase')
hoyi = Hero(1,250,23,'hoyi')
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