Mostly worked out how to do looting but now need how to take out of inventory and put into loot.

This commit is contained in:
Zed A. Shaw 2025-06-07 00:11:29 -04:00
parent c509162be1
commit 94385b195d
7 changed files with 139 additions and 54 deletions

View file

@ -1,4 +1,5 @@
#pragma once
#include "constants.hpp"
#include "levelmanager.hpp"
#include "simplefsm.hpp"
@ -15,16 +16,18 @@
namespace gui {
enum class State {
START,
MOVING,
IN_COMBAT,
COMBAT_ROTATE,
ATTACKING,
ROTATING,
NEXT_LEVEL,
LOOTING,
IDLE,
END
START=0,
MOVING=1,
IN_COMBAT=2,
COMBAT_ROTATE=3,
ATTACKING=4,
ROTATING=5,
NEXT_LEVEL=6,
LOOTING=7,
LOOT_GRAB=8,
INV_GRAB=9,
IDLE=10,
END=11
};
class FSM : public DeadSimpleFSM<State, Event> {
@ -65,6 +68,8 @@ namespace gui {
void COMBAT_ROTATE(Event ev);
void NEXT_LEVEL(Event ev);
void LOOTING(Event ev, std::any data);
void LOOT_GRAB(Event ev, std::any data);
void INV_GRAB(Event ev, std::any data);
void END(Event ev);
void try_move(int dir, bool strafe);