ICT290 / src / scene / AIController / Goals / GoalMoveToPosition.h
GoalMoveToPosition.h
Raw
#pragma once
//#pragma warning (disable:4786)

#include <glm/glm.hpp>
#include "../Vehicle.h"
#include "ArcanistGoalTypes.h"
#include "GoalComposite.h"

class GoalMoveToPosition : public GoalComposite<Vehicle> {
   private:
    // the position the bot wants to reach
    glm::vec2 m_Destination;

   public:
    GoalMoveToPosition(Vehicle* Bot, glm::vec2 pos)
        :

          GoalComposite<Vehicle>(Bot, goal_move_to_position),
          m_Destination(pos) {}

    // the usual suspects
    void Activate() override;
    int Process() override;
    void Terminate() override {}

    // this goal is able to accept messages
    bool HandleMessage(const Telegram& msg) override;

    void markOwnerWithGoal() override { m_Owner->m_Goal = m_Type; }
};