public void Enter(int num) { if (main.character.tapEnable && ClimberStateManager.state != ClimberState.FLYING) { main.lockTap(); if (!isAnimating) { LeanAudio.play(click, 1f); if (num < 0) // erase last number / Backspace { result = (result - result % 10) / 10; } else { result = result * 10 + num; } ui.SetSolution(result); TrySubmit(); failsafeTimer = 0.1f; timeouts = 0; } } }
// Use this for initialization void Start() { ui = FindObjectOfType <TaskUI>(); gameData = FindObjectOfType <FMC_GameDataController> (); main = FindObjectOfType <GameController> (); FMC_TaskCreation.newTaskCreated += NewTask; if (gameData != null) { gameData.createFirstTask(); } else { Debug.LogError("Achtung! There's no GameData object"); } ui.SetSolution(""); }