1
0
mirror of https://github.com/ncblakely/GiantsTools synced 2024-12-23 15:57:22 +01:00
GiantsTools/Sdk/Include/AI/Public/Components/MoveEnactorDebug.h

52 lines
1005 B
C
Raw Normal View History

2021-01-24 00:40:09 +01:00
#pragma once
#include "MoveEnactor.h"
#include "../MoveUtil.h"
namespace ECS
{
#ifdef ENABLE_DEBUG
template<>
inline void EntityComponentEditor<AI::MoveEnactor>(AI::MoveEnactor& component)
{
if (ImGui::TreeNode("MoveEnactor"))
{
if (component.Path)
{
for (size_t i = 0; i < component.Path->MoveGoals.size(); i++)
{
const auto& goal = component.Path->MoveGoals[i];
ImGui::Text("%sMoveGoal: %.2f %.2f %.2f", i == component.Path->CurrentGoal ? "(Active) " : "", goal.loc.x, goal.loc.y, goal.loc.z);
}
}
if (ImGui::Button("Move to Player"))
{
/*
MoveUtil::ClearAllGoals(component);
AI::MoveGoal goal;
goal.loc = PlayerObj->location;
FlagSet(goal.gflags, AI::GoalFlag::Is3D | AI::GoalFlag::Flyer);
component.Path.MoveGoals.push_back(goal);
*/
}
if (ImGui::Button("Clear Goals"))
{
AI::MoveUtil::ClearAllGoals(component);
}
if (ImGui::Button("Move To Shop"))
{
}
ImGui::TreePop();
}
}
#endif
}