示例#1
0
    public void OnMovementDone(NodeSideInfo info)
    {
        _sittingNodeInfo = info;
        _sittingNodeInfo.SittingObject = gameObject;

        _boardObject.UpdateNeighbourCells();

        //만약 플레이어가 죽거나 출구에 도착한다면 true를 반환한다
        if (_boardObject.CheckMovement(_sittingNodeInfo))
        {
            StopFindPath();
            return;
        }

        foreach (var movement in _availableMovements)
        {
            movement.UpdateNodeSideInfo(_sittingNodeInfo);
        }

        if (_boardObject.CheckAdjacentCells())
        {
            StopFindPath();
        }

        _boardObject.OnMovementDone();
    }