Exemple #1
0
    //Player confirms the movement after the unit has moved and/or attacked
    public void EstablishNewTile()
    {
        ClickableTile newTile = possibleDestination;

        if (unitHasMoved == true && decidedToCapture == false)
        {
            capturePoints = 0;
        }

        gameObject.transform.position = new Vector3(newTile.GetTileCoordX(), newTile.GetTileCoordY(), gameObject.transform.position.z);
        originTile.UnassignUnit();
        newTile.AssignUnit(this);
        originTile = newTile;
        GameManager.instance.unitSelected = null;
        TireUnit();
        Map.instance.ReturnTilesToNormal();
    }