📄 person.h
字号:
#ifndef _Person_H
#define _Person_H
#include"stdafx.h"
class Person
{
protected:
int hp;
int x,y;
RECT r;
public:
Person(){hp=1;x=0;y=0;}
Person(int h){hp=h;x=0;y=0;}
~Person(){}
int gethp()const {return hp;}
void goright(int d){x+=d;}
void goleft(int d){x-=d;}
void goup(int d){y-=d;}
void godown(int d){y+=d;}
int getx()const {return x;}
int gety()const {return y;}
void setpos(int a,int b)
{
x=a;
y=b;
}
RECT * getrect()
{
return &r;
}
void setrect(int left,int right,int top,int bottom)
{
r.right=right;
r.left=left;
r.top=top;
r.bottom=bottom;
}
void getshooted(){hp--;}
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -