コード例 #1
0
ファイル: Twippie.cs プロジェクト: michelseb/lordoftwippies
    private void TryFinalizePath(Zone destination, GoalType goal)
    {
        if (destination == null)
        {
            Debug.Log("No paths found");
            return;
        }

        _goalObject.transform.SetParent(null);

        _goalObject.transform.position = destination.WorldPos;
        _goalType = goal;
        LineRenderer.positionCount = _pathFinder.Path.Count + 1;

        _goalObject.transform.SetParent(Planet.transform);
        _arrival.SetArrival();

        _hasDestination = true;
        _setDestination = null;
    }