Ejemplo n.º 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();
        }
Ejemplo n.º 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);
    }
Ejemplo n.º 3
0
 private void OnEnable()
 {
     inputAction.Enable();
 }
Ejemplo n.º 4
0
 // Start is called before the first frame update
 private void OnEnable()
 {
     controls.Enable();
 }
Ejemplo n.º 5
0
 private void Enable()
 {
     Debug.Log("enabled");
     inputAction.Enable();
 }