void AIRobot::Update(float elapsedTime) { // Step 1 : check for enemy // TODO : Finish this part and decide what to do CheckForEnemy(); // Step 2 : check if we reached target if (isCloseEnough()) { mGridPos = mGridTarget; FindNewTarget(); } // Step 3 : move towards target MoveToTarget(elapsedTime); }
inline bool IsCloseEnough(double A, double B, double Epsilon) { return isCloseEnough(A,B,Epsilon); }