void SetCurrentActions(int actionIndex) { if (navAgents[actionIndex] == null || navDestinations[actionIndex] == null) { Debug.LogWarning("Nav agent or destination # " + actionIndex + " was not set"); return; } currentNavAction = navActions[actionIndex]; currentNavAgent = navAgents[actionIndex]; currentDelayTime = actionStartDelay[actionIndex]; currentNavDest = navDestinations[actionIndex].position; currentNavSpeed = navAgentSpeed[actionIndex]; }
void SetCurrentActions(int actionIndex) { if(navAgents[actionIndex] == null || navDestinations[actionIndex] == null) { Debug.LogWarning("Nav agent or destination # " + actionIndex + " was not set"); return; } currentNavAction = navActions[actionIndex]; currentNavAgent = navAgents[actionIndex]; currentDelayTime = actionStartDelay[actionIndex]; currentNavDest = navDestinations[actionIndex].position; currentNavSpeed = navAgentSpeed[actionIndex]; }