예제 #1
0
    public void MagicTageting(Direction direction)
    {
        Coordinates coordinates;

        if (currentMagic.type == Magic.Type.shoot || !currentMagic.targeting)
        {
            if (tileMapManager.TileCheck(coordinates = player.PlayerDirection(direction)))
            {
                magicMarkerCoordinates = coordinates;
                magicMarker.position   = tileMapManager.CoordinatesToPostion(magicMarkerCoordinates) + Vector3.up * 0.2f;
                magicDirection         = direction;
            }
        }
        else
        {
            if (tileMapManager.TileCheck(coordinates = player.CoordinatesDirection(magicMarkerCoordinates, direction)) && tileMapManager.RangeCheck(tileMapManager.playerCoordinates, coordinates, currentMagic.range))
            {
                magicMarkerCoordinates = coordinates;
                magicMarker.position   = tileMapManager.CoordinatesToPostion(magicMarkerCoordinates) + Vector3.up * 0.2f;
            }
        }
    }