Game Development Reference
In-Depth Information
{
if (GUI.Button(new Rect(10, 10, 100, 50), "Run
Away"))
{
NavigationManager.NavigateTo("World");
}
}
}
Now, add a new empty game object to the battle scene, name it
BattleManager
, and
then attach the new script to it. Once there, we can configure it by adding the spawn
points we created earlier to
EnemySpawnPoints
and the Goblin prefab to the
EnemyPrefabs
parameter along with the Spawn Animation Curve, as shown in the fol-
lowing screenshot: