Esempio n. 1
0
    private IEnumerator SwitchWeapon(HackerHand hand)
    {
        selectedWeaponIndex = (selectedWeaponIndex + 1) % selectionPositions.Length;
        var touchPos    = selectionPositions[selectedWeaponIndex];
        var touchPosVec = new Vector2(touchPos[0], touchPos[1]) * 0.8f;

        player.OpenAbilitySelectionWheel(hand);
        yield return(new WaitForFixedUpdate());

        player.SetAbilitySelectionPosition(hand, touchPosVec);
        yield return(new WaitForSeconds(0.2f));

        player.ConfirmAbilitySelection(hand, touchPosVec);
        yield return(new WaitForSeconds(0.1f));

        player.CloseAbilitySelectionWheel(hand);
    }
 private void Controller_PadClicked(object sender, ClickedEventArgs e)
 {
     // make sure it is open (sometimes, clicked may be fired before touched)
     player.OpenAbilitySelectionWheel(GetCurrentHand());
     player.ConfirmAbilitySelection(GetCurrentHand(), new Vector2(e.padX, e.padY));
 }