public void ValueModifierEntered(ValueModifierUI val) { prevState = state; state = Enums.UIStates.ValueModifier; currentValueMod = val; currentValueMod.GetComponent <Selectable>().interactable = false; }
private void ValueModifier() { if (ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickY, PlayerID.One) > ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadY, PlayerID.One) > 0) { if (vTimer >= delay || vTimer == 0) { currentValueMod.IncrementValue(); vTimer = 0; } vTimer += Time.deltaTime; } else if (ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickY, PlayerID.One) < -ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadY, PlayerID.One) < 0) { if (vTimer >= delay || vTimer == 0) { currentValueMod.DecrementValue(); vTimer = 0; } vTimer += Time.deltaTime; } else { vTimer = 0; } if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.B, PlayerID.One) || ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.A, PlayerID.One)) { state = prevState; currentValueMod.GetComponent <Selectable>().interactable = true; } }
public void ValueModifierEntered(ValueModifierUI val) { prevState = state; prevSelected = EventSystem.current.currentSelectedGameObject; state = Enums.UIStates.ValueModifier; currentValueMod = val; currentValueMod.GetComponent <Selectable>().interactable = false; }
private void ValueModifier() { if (ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickY, PlayerID.One) > ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadY, PlayerID.One) > 0 || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickX, PlayerID.One) > ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadX, PlayerID.One) > 0) { if (vTimer >= delay || vTimer == 0) { currentValueMod.IncrementValue(); vTimer = 0; SFXManager.instance.PlayClick(); } vTimer += Time.deltaTime; } else if (ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickY, PlayerID.One) < -ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadY, PlayerID.One) < 0 || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.LeftStickX, PlayerID.One) < -ControllerManager.CUSTOM_DEADZONE || ControllerManager.instance.GetAxis(ControllerInputWrapper.Axis.DPadX, PlayerID.One) < 0) { if (vTimer >= delay || vTimer == 0) { currentValueMod.DecrementValue(); vTimer = 0; SFXManager.instance.PlayClick(); } vTimer += Time.deltaTime; } else { vTimer = 0; } if (ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.B, PlayerID.One) || ControllerManager.instance.GetButtonDown(ControllerInputWrapper.Buttons.A, PlayerID.One)) { state = prevState; currentValueMod.GetComponent <Selectable>().interactable = true; Navigator.CallCancel(); EventSystem.current.SetSelectedGameObject(prevSelected); } }
public void ValueModifierEntered(ValueModifierUI val) { prevState = state; state = Enums.UIStates.ValueModifier; currentValueMod = val; currentValueMod.GetComponent<Selectable>().interactable = false; }
public void ValueModifierEntered(ValueModifierUI val) { prevState = state; prevSelected = EventSystem.current.currentSelectedGameObject; state = Enums.UIStates.ValueModifier; currentValueMod = val; currentValueMod.GetComponent<Selectable>().interactable = false; }