Example #1
0
    public override void Start()
    {
        base.Start();

        _menu = inventoryRadialMenu.GetComponent <RMF_RadialMenu>();
        _menu.SetAllChildrenEnabled(false);
        possibleInteractions = new Collider[_maxInteractionsToCheck];
    }
Example #2
0
    public void OnAltFire(InputAction.CallbackContext context)
    {
        float input = context.ReadValue <float>();

        playerState.AltInteractWith(input);         //we do need to do this to an InteractWithAlt() to handle this behavior based on the user's input

        mouseRightClickPosition = Mouse.current.position.ReadValue();
        radialMenuOpen          = Convert.ToBoolean(input);

        if (radialMenuOpen)
        {
            _menu.SetAllChildrenEnabled();
        }
        else
        {
            _menu.MakeSelection(Mouse.current.position.ReadValue() - previousMousePos);
        }
    }