Example #1
0
    // Once a level has been loaded, calls all the initialization events
    private System.Action <AsyncOperation> onLevelLoaded(Level levelLoaded)
    {     //Curried to ensure that the loaded level is the one which was intended
        return(_ =>
        {
            NoParens.val = levelLoaded.Restrictions.noParens;
            NoBackApp.val = levelLoaded.Restrictions.noBackApp;
            NoForwardApp.val = levelLoaded.Restrictions.noForwardApp;

            onLevelLoad.InvokeAsync(new Unit());
            onLevelLoadArity.InvokeAsync(levelLoaded.Goal.arity);
            onLevelLoadLambda.InvokeAsync(levelLoaded.Goal.lambdaTerm);
        });
    }