满意答案
_注册用户_
2013.10.31
采纳率:55% 等级:12
已帮助:6250人
class Role
{
public:
Role()
{
x = Random();
y = Random();
}
inline void Up()
{
y+=5;
if(y>MAX_HEIGHT) y=MAX_HEIGHT;
}
inline void Down()
{
y-=5;
if(y
}
inline void Left()
{
x-=5;
if(x
}
inline void Right()
{
x+=5;
if(x>MAX_WIDTH) y=MAX_WIDTH;
}
private:
int x;//横坐标
int y;//纵坐标
ICON icon //角色图标
};
class Player : public class Role
{
public:
Player()
{
SetICON();
}
};
class Thief : public class Role
{
public:
Player()
{
SetICON();
}
};
00分享举报