void Start()
    {
        TransitionManager.FadeIn(1f, Color.black);

        var playerStatManager = new PlayerStatManager();

        GameObjectM.GetComponentOnObject <PlayerController>("Player").Setup(playerStatManager);

        var PlayerStatusController = GameObjectM.GetComponentOnObject <PlayerStatusController>("Player");

        GameObjectM.GetComponentOnObject <GuiPanelController>("GuiPanel").Setup(playerStatManager, PlayerStatusController);
    }
Example #2
0
    public void FinishLevel()
    {
        if (IsLevelFinished())
        {
            //Play sound
            endOfLevelAudio.Play();

            // Start transition
            transitionManager.FadeIn();
        }
        else
        {
            StartCoroutine(LevelLost());
        }
    }