Beispiel #1
0
    private string FindLocationIdOfCurrentLocation() // Finds the ID of the location that the player is currently in
    {
        Transform currentLocation = _playerMovement.lastTarget;

        string[,] locIndexArray = _dataBaseConnector.DataBaseLocationSelect();
        string locIndex = "-1";

        for (int i = 0; i < 6; i++)
        {
            if (currentLocation.transform.name == locIndexArray[i, 1])
            {
                locIndex = locIndexArray[i, 0];
            }
        }

        return(locIndex);
    }