Example #1
0
    public void CloseAbilitySelectionWheel(HackerHand hand)
    {
        AbilitySelectionWheel wheel = selectionWheels[(int)hand];

        if (wheel == null)
        {
            return; // already closed
        }
        Destroy(wheel.gameObject);
        selectionWheels[(int)hand] = null;
    }
Example #2
0
    public void SetAbilitySelectionPosition(HackerHand hand, Vector2 position)
    {
        AbilitySelectionWheel wheel = selectionWheels[(int)hand];

        if (wheel == null)
        {
            return; // not open
        }
        if (hand == HackerHand.Left)
        {
            // mirror input
            position.x = -position.x;
        }

        wheel.SetPreviewPosition(position);
    }
Example #3
0
    private IEnumerator _ConfirmCoroutineHelper(HackerHand hand, Vector2 position)
    {
        yield return(null); // delay by one frame

        AbilitySelectionWheel wheel = selectionWheels[(int)hand];

        if (wheel == null)
        {
            yield break; // not open
        }
        AbilityType?newAbility = wheel.ConfirmSelection(position);

        if (newAbility != null)
        {
            EquipAbility(hand, newAbility.Value);
            //CloseAbilitySelectionWheel(hand);
        }
    }