Beispiel #1
0
 void OnEnable()
 {
     PMWrapper.mainCode = codeAtStart;
     PMWrapper.SetCompilerFunctions(
         new CustomFunction()
         );
 }
    void Awake()
    {
        PMWrapper.SetCompilerFunctions(
            new MoveFunction("gå_norr", Direction.North),
            new MoveFunction("gå_väst", Direction.West),
            new MoveFunction("gå_syd", Direction.South),
            new MoveFunction("gå_öst", Direction.East)
            );

        PMWrapper.AutoSetSmartButtons();
    }
 public void UseSettings()
 {
     PMWrapper.codeRowsLimit = rowLimit;
     PMWrapper.SetTaskDescription(taskDescription);
     PMWrapper.preCode = preCode;
     PMWrapper.AddCodeAtStart(startCode);
     UISingleton.instance.levelHandler.currentLevel.caseHandler = new CaseHandler(caseCount);
     PMWrapper.codewalkerBaseSpeed = gameSpeed;
     PMWrapper.SetSmartButtons(smartButtons);
     PMWrapper.SetCompilerFunctions(functions);
 }
Beispiel #4
0
        private void SetSceneSettings()
        {
            if (currentSceneSettings.walkerStepTime > 0)
            {
                PMWrapper.walkerStepTime = currentSceneSettings.walkerStepTime;
            }

            if (currentSceneSettings.gameWindowUiLightTheme)
            {
                GameWindow.Instance.SetGameWindowUiTheme(GameWindowUiTheme.light);
            }
            else
            {
                GameWindow.Instance.SetGameWindowUiTheme(GameWindowUiTheme.dark);
            }

            if (currentSceneSettings.availableFunctions != null)
            {
                var availableFunctions = CreateFunctionsFromStrings(currentSceneSettings.availableFunctions);
                PMWrapper.SetCompilerFunctions(availableFunctions);
            }
        }
Beispiel #5
0
 private void ClearSettings()
 {
     PMWrapper.SetTaskDescription("", "");
     PMWrapper.SetCompilerFunctions();
     PMWrapper.preCode = "";
 }