input
This commit is contained in:
@@ -8,6 +8,8 @@
|
||||
#pragma once
|
||||
#include "player.h"
|
||||
|
||||
#define ENTITY_MOVE_SUBPIXEL 4
|
||||
|
||||
typedef enum {
|
||||
ENTITY_DIR_UP = 0,
|
||||
ENTITY_DIR_DOWN = 1,
|
||||
@@ -62,6 +64,29 @@ void entityInit(entity_t *entity, const entitytype_t type);
|
||||
*/
|
||||
void entityUpdate(entity_t *entity);
|
||||
|
||||
/**
|
||||
* Turns the entity to face a specific direction.
|
||||
*
|
||||
* @param entity Pointer to the entity to turn.
|
||||
* @param dir The direction to turn the entity towards.
|
||||
*/
|
||||
void entityTurn(entity_t *entity, const entitydir_t dir);
|
||||
|
||||
/**
|
||||
* Makes the entity walk in the current direction.
|
||||
*
|
||||
* @param entity Pointer to the entity to make walk.
|
||||
*/
|
||||
void entityWalk(entity_t *entity);
|
||||
|
||||
/**
|
||||
* Checks if the entity is currently mid-walking.
|
||||
*
|
||||
* @param entity Pointer to the entity to check.
|
||||
* @return true if the entity is walking, false otherwise.
|
||||
*/
|
||||
bool_t entityIsWalking(const entity_t *entity);
|
||||
|
||||
/**
|
||||
* Resets the entity at a given position.
|
||||
*
|
||||
|
Reference in New Issue
Block a user