unity dictionary get value code example
Example: unity dictionary get value
if (!haveMisionsAsigned && gameRecord.searchedArea == null)
{
for (int i = 0; i < areaArray.Length; i++)
{
if (gameRecord.availableAreas[areaArray[i]])
{
gameRecord.misionsAsigned.Add(misionController.AssignMision("Busqueda", areaArray[i]), areaArray[i].localizations[Random.Range(0,areaArray[i].localizations.Length)].transform);
}
}
}
else if (!haveMisionsAsigned && gameRecord.searchedArea != null)
{
for (int i = 0; i < 3; i++)
{
gameRecord.misionsAsigned.Add(misionController.AssignMision(misionTypeArray[Random.Range(0, misionTypeArray.Length)], gameRecord.searchedArea), gameRecord.searchedArea.localizations[Random.Range(0,gameRecord.searchedArea.localizations.Length)].transform);
}
}
if (!gameRecord.estaEnMarxaUnaMisio)
{
//Get the mision info from dictionary (like mision.misiondescription) to add it in a funcionality of a button
}