Adding restart function.

This commit is contained in:
Anonymous Raccoon
2018-08-13 20:23:43 +02:00
parent 161c34a5f2
commit d959b6d79b
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -60,6 +60,12 @@ public class InventoryManager : MonoBehaviour
}
draggedPosition = -1;
}
if (Input.GetKeyDown(KeyCode.R))
{
ClearBoard();
GetComponent<Mission>().GenerateMission();
GetComponent<Pokedex>().UpdateMissionText();
}
}
private bool CanPlantAt(Vector3 position, TreeItem item)
+2 -1
View File
@@ -27,7 +27,8 @@ public class Mission : MonoBehaviour {
}
}
private void GenerateMission()
public void GenerateMission()
{
for (int i = 0; i < difficulte; i++)
{