ICT290 / src / scene / AIController / Messaging / State.h
State.h
Raw
//
// Created by Micha on 4/10/2021.
//

#pragma once
struct Telegram;

template <class entity_type>
class State_ {
   public:
    virtual ~State_() {}

    // this will execute when the state is entered
    virtual void Enter(entity_type*) = 0;

    // this is the states normal update function
    virtual void Execute(entity_type*) = 0;

    // this will execute when the state is exited.
    virtual void Exit(entity_type*) = 0;

    // this executes if the agent receives a message from the
    // message dispatcher
    virtual bool OnMessage(entity_type*, const Telegram&) = 0;
};