public override void Enter() { _control.EventDestroyed += tankDestroyedHandler; // Move to the enemy tank. _control.MoveTo(_blackboard.EnemyTank.Position); _reAimInterval = 1.5f; }
/// <summary> /// Moves tank to the specified point. /// </summary> /// <param name="aPoint">Point of target position.</param> public void MoveTo(Vector2 aPoint) { // Subscribe to the TankControl events. _control.EventArrived += ArrivedHandler; _control.EventWayNotFound += WayNotFoundHandler; // Move to our target. _control.MoveTo(aPoint); }
public void Pickup(ItemKind aItem) { _itemKind = aItem; _targetItem = _blackboard.GetItem(_itemKind); if (_targetItem != null) { _control.MoveTo(_targetItem.Position); } }