/// <summary> /// Moves towards the given target and then executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Vector3 pos, UnitActionCallback actionCallback) { if (CheckBrain()) { //m_brain.StopCurrentAction(); m_Movement.MoveTo(pos); m_brain.CurrentAction = new AIMoveThenExecAction(this, actionCallback); } }
/// <summary> /// Moves towards the given target and then executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToPointsThenExecute(List<Vector3> points, UnitActionCallback actionCallback) { if (CheckBrain()) { //m_brain.StopCurrentAction(); m_Movement.MoveToPoints(points); m_brain.CurrentAction = new AIMoveThenExecAction(this, actionCallback); } }
/// <summary> /// Moves to the given target and once within the given range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(GameObject go, SimpleRange range, UnitActionCallback actionCallback) { MoveToThenExecute(go, range, actionCallback, 0); }
/// <summary> /// Moves to the given target and once within the given range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Unit unit, SimpleRange range, UnitActionCallback actionCallback) { MoveToThenExecute(unit, range, actionCallback, 0); }
/// <summary> /// Moves to the given gameobject and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(GameObject go, float angle, UnitActionCallback callback, int millisTimeout) { if (CheckBrain()) { //m_brain.StopCurrentAction(); var action = new AIMoveToGameObjectIntoAngleThenExecAction(this, go, angle, callback) { TimeoutMillis = millisTimeout }; m_brain.CurrentAction = action; } }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Unit unit, float angle, UnitActionCallback callback, int millisTimeout) { if (CheckBrain()) { //m_brain.StopCurrentAction(); Target = unit; var action = new AIMoveIntoAngleThenExecAction(this, angle, callback) { TimeoutMillis = millisTimeout }; m_brain.CurrentAction = action; } }
public AIMoveToGameObjectIntoAngleThenExecAction(Unit owner, GameObject go, float angle, UnitActionCallback actionCallback) : base(owner, actionCallback) { _angle = angle; _gameObject = go; }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Unit unit, UnitActionCallback actionCallback) { MoveToThenExecute(unit, actionCallback, 0); }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveBehindThenExecute(GameObject go, UnitActionCallback actionCallback) { MoveBehindThenExecute(go, actionCallback, 0); }
/// <summary> /// Moves in front of the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveInFrontThenExecute(GameObject go, UnitActionCallback actionCallback, int millisTimeout) { MoveToThenExecute(go, 0f, actionCallback); }
/// <summary> /// Moves in front of the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveInFrontThenExecute(Unit unit, UnitActionCallback actionCallback, int millisTimeout) { MoveToThenExecute(unit, 0f, actionCallback); }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Unit unit, UnitActionCallback actionCallback, int millisTimeout) { if (CheckBrain()) { //m_brain.StopCurrentAction(); Target = unit; m_brain.CurrentAction = new AIMoveToThenExecAction(this, actionCallback); } }
/// <summary> /// Moves towards the given target and then executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Vector3 pos, UnitActionCallback actionCallback) { MoveToThenExecute(pos, true, actionCallback); }
public AIMoveIntoRangeThenExecAction(Unit owner, SimpleRange range, UnitActionCallback actionCallback) : base(owner, actionCallback) { m_Range = range; }
public AIMoveIntoAngleThenExecAction(Unit owner, float angle, UnitActionCallback actionCallback) : base(owner, actionCallback) { m_Angle = angle; }
/// <summary> /// Moves to the given target and once within the given range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(Unit unit, SimpleRange range, UnitActionCallback actionCallback, int millisTimeout) { if (CheckBrain()) { //m_brain.StopCurrentAction(); Target = unit; m_brain.CurrentAction = new AIMoveIntoRangeThenExecAction(this, range, actionCallback) { TimeoutMillis = millisTimeout }; } }
/// <summary> /// Moves to the given target and once within the given range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(GameObject go, SimpleRange range, UnitActionCallback actionCallback, int millisTimeout) { if (CheckBrain()) { m_brain.CurrentAction = new AIMoveIntoRangeOfGOThenExecAction(this, go, range, actionCallback) { TimeoutMillis = millisTimeout }; } }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveBehindThenExecute(Unit unit, UnitActionCallback actionCallback, int millisTimeout) { MoveToThenExecute(unit, MathUtil.PI, actionCallback); }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveBehindThenExecute(GameObject go, UnitActionCallback actionCallback, int millisTimeout) { MoveToThenExecute(go, MathUtil.PI, actionCallback); }
/// <summary> /// Moves to the given target and once within default range, executes the given action /// </summary> /// <remarks>Requires Brain</remarks> public void MoveToThenExecute(GameObject go, float angle, UnitActionCallback actionCallback) { MoveToThenExecute(go, angle, actionCallback, 0); }
public AIMoveThenExecAction(Unit owner, UnitActionCallback actionCallback) : base(owner) { ActionCallback = actionCallback; }
public AIMoveIntoRangeOfGOThenExecAction(Unit owner, GameObject go, SimpleRange range, UnitActionCallback actionCallback) : base(owner, actionCallback) { _gameObject = go; m_Range = range; }