Ejemplo n.º 1
0
    bool MoveCommand(Transform chess)
    {
        bool              moveable      = false;
        CharacterSelect   chessSelect   = chess.GetComponent <CharacterSelect>();
        CharacterProperty chessProperty = chess.GetComponent <CharacterProperty>();
        Transform         localUnit     = chessSelect.getMapPosition();
        IList             pathList      = new List <Transform>();
        Transform         sel           = decisions.GetMoveTarget(chess);

        if (sel != null)
        {
            pathList = chessSelect.FindPathList(localUnit, CurrentSel.GetSteps(localUnit, sel), sel);
            MoveCharacter mc = Camera.main.GetComponent <MoveCharacter>();
            mc.SetSteps(chess, pathList);
            chessProperty.Moved = true;
            moveable            = true;
        }
        else
        {
            moveable = false;
        }
        return(moveable);
    }