24 lines
684 B
C
24 lines
684 B
C
#ifndef CHARACTER_ACTION_CLASS
|
|
#define CHARACTER_ACTION_CLASS
|
|
|
|
#include <glm/glm.hpp>
|
|
|
|
enum class CharacterActionType {
|
|
Move // walk along direction, or stand still if it's zero
|
|
};
|
|
|
|
// Something a character's mind wants it to do this frame. Minds produce these, the body carries them out.
|
|
struct CharacterAction {
|
|
CharacterActionType type = CharacterActionType::Move;
|
|
glm::vec3 direction = glm::vec3(0.0f); // world space, only x and z are used
|
|
|
|
static CharacterAction Move(const glm::vec3& direction) {
|
|
CharacterAction action;
|
|
action.type = CharacterActionType::Move;
|
|
action.direction = direction;
|
|
return action;
|
|
}
|
|
};
|
|
|
|
#endif
|