Hello,
My unit has been separated in 2 different types of “actions” the Move action and “Other” actions, they use different points and are independent of eachother, in this case how should i go about testing if the player has action points to do either a move action or an other action in the EnemyAI script, TryTakeEnemyAIAction.
I have two functions for checking if the unit has enough points to either move or to do other actions(naming will change most likely)
public bool CanSpendActionPointsToMoveAction(BaseAction baseAction)
{
if(moveActionPoints >= baseAction.GetActionPointsCost())
{
return true;
}
else
{
return false;
}
}
public bool CanSpendActionPointsToTakeOtherActions(BaseAction baseAction)
{
if(otherActionPoints >= baseAction.GetActionPointsCost())
{
return true;
}
else
{
return false;
}
}
I dont know if i explained well enough what im looking for here, if not please let me know and il try to explain it better.