Exemple #1
0
        public MyInput(DefaultControl input)
        {
            _defaultInput = input;

            _defaultInput.PlayerOnFoot.Move.performed += MoveOnperformed;

            _defaultInput.PlayerOnFoot.Jump.started  += context => IsJump = true;
            _defaultInput.PlayerOnFoot.Jump.canceled += context => IsJump = false;

            _defaultInput.PlayerOnFoot.Attack.started  += context => IsAttack = true;
            _defaultInput.PlayerOnFoot.Attack.canceled += context => IsAttack = false;

            _defaultInput.Enable();
        }
Exemple #2
0
    void Start()
    {
        controls = new DefaultControl();
        controls.Enable();
        controls.UI.MapShow.performed += shmp => ShowMap();
        controls.UI.UIHide.performed  += hide => HideUI();

        mapView.localScale   = hidden;
        blurLayer.localScale = hidden;
        mapShown             = false;

        slopeMapShown = false;
        slopeMapProjector.orthographic = false;
        SMToggle.color    = new Color(0.3f, 0.3f, 0.3f, 1f);
        SMToggleMap.color = new Color(0.3f, 0.3f, 0.3f, 1f);

        heightMapShown = false;
        heightMapProjector.orthographic = false;
        HMToggle.color    = new Color(0.3f, 0.3f, 0.3f, 1f);
        HMToggleMap.color = new Color(0.3f, 0.3f, 0.3f, 1f);
    }
 private void OnEnable()
 {
     inputAction.Enable();
 }
 // Start is called before the first frame update
 private void OnEnable()
 {
     controls.Enable();
 }
 private void Enable()
 {
     Debug.Log("enabled");
     inputAction.Enable();
 }