Commit 5596f567 by BellCodeEditor

save project

parent 7b36b743
Showing with 6 additions and 19 deletions
class Dog: # 狗类 self.hero_type=hero_type
def __init__(self): print("角色"+self.name+"创建成功,英雄类型为:",self.hero_type)
self.footNum = 4 # 腿 print("当前等级,血量,攻击分别为:",self.level,self.hp,self.attack)
self.eyeNum = 2 # 眼睛
self.head = 1 # 头
self.earsNum = 2 # 耳朵
self.skin = "white"
def run(self): houyi=Player("后羿""射手")
print("狗狗飞快的跑起来") yase=Hero("亚瑟")
\ No newline at end of file
class Husky(Dog): # 哈士奇类
def __init__(self):
super().__init__()
self.skin="black"
coco = Husky()
print(coco.skin)
\ 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