Esempio n. 1
0
 private void OnEnable()
 {
     EventsSystem.ADD_StepsChangedListener(StepSound);
     EventsSystem.ADD_GameLoseListener(LoseSound);
     EventsSystem.ADD_GameWinListener(WinSound);
     EventsSystem.ADD_PlayerFailListener(FailSound);
     EventsSystem.ADD_PlayerSuccessListener(SuccessSound);
 }
Esempio n. 2
0
    /*
     * EACH LEVEL HAS A NUMBER
     * - FIND A WAY TO READ THE NAME OF THE SCENE?
     *
     * EACH LEVEL IS AN ARRAY OF STRINGS
     * LEVELS <BOOL, STRING[]>
     *
     |-WORLD
     |---LEVEL
     *
     * LEVELS WRAPPED - ACTIVE TOGGLE
     * ON INIT LOADS FROM STRING AND MOVES PLAYER
     *
     */

    private void OnEnable()
    {
        InitUI();

        if (TorchPoints == null)
        {
            TorchPoints = new Dictionary <Vector3, TorchPoint>();
        }
        if (Spaces == null)
        {
            Spaces = new Dictionary <Vector3, Space>();
        }

        EventsSystem.ADD_GameLoseListener(LoseScreen);
        EventsSystem.ADD_GameWinListener(WinScreen);
    }