📄 slug.h
字号:
#ifndef SLUG_H
#define SLUG_H
#include "WorldObject.h"
class invasion;
class slug : public world_object
{
public:
// This Slugwroth will go from one state to another
// depending on Captain Chloride's actions.
enum state
{
STATE_ASLEEP,
STATE_CHASING
};
slug();
std::string Type();
bool Update(
invasion *theGame);
bool Render(
invasion *theGame);
// If something wakes me up, I will chase it!
void WakeUp(
world_object *waker);
void Kill();
// If I walk into something, I will stop.
void Hit(
world_object &stationary);
private:
slug::state currState;
vectorf velocity;
public:
animated_sprite myAnims;
};
inline std::string
slug::Type()
{
return "slug";
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -