public void GoAround(GameObject patrol) { CCMoveAroundAction action = CCMoveAroundAction.getAction(1.2f, GetNewPos(patrol)); actions.Add(patrol.GetComponent <Patrol>().area, action); addAction(patrol.gameObject, action, this); }
public static CCMoveAroundAction getAction(float speed_, Vector3 target_) { CCMoveAroundAction action = ScriptableObject.CreateInstance <CCMoveAroundAction>(); action.target = target_; action.speed = speed_; return(action); }