DAY 9
I want to make a mention about all the resources that I have used in this game. I think that the best place to do it is in the credits scene. So, I made a little change to the Level information to set a flag for the last level.
[CreateAssetMenu(fileName = "Level", menuName = "FreeThemAll/New Level", order = 1)] public class LevelData : ScriptableObject { public int Number; public string SceneNameFile; public int PrisonersCount; public int EnemiesCount; public bool Hashelp; public string HelpText; public bool IsTheLastLevel; }
It´s not the best way to do it, I know, but it works. Of course I had to change the Game Manager.
bool isTheLastLevel = _currentLevel != null && _currentLevel.IsTheLastLevel; _currentLevel = null; if (isTheLastLevel) { _state = GameState.SHOWING_CREDITS; SceneManager.LoadSceneAsync("Credits"); }
I have to reference the assets that I used