base
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user