Add building preview
This commit is contained in:
@@ -6,6 +6,14 @@
|
||||
|
||||
#include "entity_map.h"
|
||||
|
||||
typedef enum InputState {
|
||||
INPUT_NONE,
|
||||
INPUT_PLACING,
|
||||
INPUT_DRAGGING,
|
||||
INPUT_SELECTED_UNITS,
|
||||
INPUT_SELECTED_OBJECT,
|
||||
} InputState;
|
||||
|
||||
typedef struct Game {
|
||||
Camera2D camera;
|
||||
BzTileset terrainTileset;
|
||||
@@ -14,10 +22,13 @@ typedef struct Game {
|
||||
BzTileMap map;
|
||||
EntityMap entityMap;
|
||||
f32 frameDuration;
|
||||
Vector2 targetPos;
|
||||
ecs_entity_t entity;
|
||||
struct {
|
||||
InputState state;
|
||||
int building;
|
||||
bool buildingCanPlace;
|
||||
TilePosition buildingPos;
|
||||
TileSize buildingSize;
|
||||
Vector2 mouseDown;
|
||||
f32 mouseDownElapsed;
|
||||
} input;
|
||||
|
||||
Reference in New Issue
Block a user