public void Start() { _oneUnitController.UnitEvents.MovePathComplete += MoveCompleteHandler; IntVector2 position = _movingRandomizer.GetRandomPoint(_oneUnitController.Position); _oneUnitController.MoveTo(position); }
private void WaitUnitOnPosition(IntVector2 position) { _targetUnit = _occupatedPossitionsMap.GetUnitOnPosition(position); if (Equals(_targetUnit.DynamicInfo.WaitPosition, _baseActionController.Position)) { IntVector2 newPosition = _movingRandomizer.GetRandomPoint(_baseActionController.Position); _baseActionController.MoveToPosition(newPosition); return; } _baseActionController.WaitPosition(_targetUnit.Position); _unitInfo.SetWaitPosition(position); _targetUnit.UnitEvents.PositionChanged += TargetUnitPositionChanged; }