Commit 20c5bfdc by BellCodeEditor

save project

parent 61753c38
Showing with 9 additions and 17 deletions
class Cat: class Hero():
def __init__(self): def __init__(self,name):
self.footNum = 4 # 腿 self.level = 1
self.eyeNum = 2 # 眼睛 self.name = name
self.head = 1 # 头 self.attack = 40
self.earsNum = 2 # 耳朵 self.hp = 240
self.skin = "black" self.max_hp = self.hp
def run(self): \ No newline at end of file
print("小猫飞快的跑起来")
def skill(self,mouse):
print("小猫抓住了"+mouse)
role = Cat()
role.skill("老鼠")
\ 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