using System.Collections; using System.Collections.Generic; using UnityEngine; public class EnterPulsesToResetDifficulty : IState { NumberInput numberInput; GameManager gm; public void enter() { gm = GameManager.instance; numberInput = gm.pulsesToResetDifficultyInput; numberInput.gameObject.SetActive(true); numberInput.Initialize(); } public void exit() => numberInput.gameObject.SetActive(false); public void update() { int continiousDir = 0; if (In.GetButtonAnyPlayer(PlayerAction.left)) continiousDir -= 1; if (In.GetButtonAnyPlayer(PlayerAction.right)) continiousDir += 1; numberInput.SwitchValue(continiousDir); if (In.GetButtonDownAnyPlayer(PlayerAction.down)) { numberInput.AcceptAndClose(); //обратный переход gm.stateMachine.ChangeState(new SettingsState()); } } }