示例#1
0
//Combo Switching
    void ComboSwitcher(ComboSO g, ComboSO a, string t)
    {
        if (g.attacks[clicks] != null)
        {
            ground = g;
        }
        if (a.attacks[clicks] != null)
        {
            air = a;
        }
        combo.text = t;
    }
示例#2
0
    void Awake()
    {
        ground     = ground1;
        air        = air1;
        combo.text = "Down";

        t.controls.Gameplay.Combo1.performed  += ctx => ComboSwitcher(ground1, air1, "Down");
        t.controls.Gameplay.Combo2.performed  += ctx => ComboSwitcher(ground2, air2, "Right");
        t.controls.Gameplay.Combo3.performed  += ctx => ComboSwitcher(ground3, air3, "Up");
        t.controls.Gameplay.Combo4.performed  += ctx => ComboSwitcher(ground4, air4, "Left");
        t.controls.Gameplay.Attack1.performed += ctx => Attacking();
    }
示例#3
0
    // Provádí akce, tak jak jsou uvedeny v kombinaci
    private void StartNextAction()
    {
        _canDealDamage = true;
        _currentActionIndex++;

        if (_currentCombo == null || (_currentActionIndex >= _currentCombo.actions.Length))
        {
            _currentCombo       = ChooseNextCombo();
            _currentActionIndex = _currentWaitTimeIndex = 0;
        }

        BossActionType nextAction = _currentCombo.actions[_currentActionIndex];

        switch (nextAction)
        {
        case BossActionType.Wait:
            ChangeState(Wait(_currentCombo.waitTime[_currentWaitTimeIndex]));
            _currentWaitTimeIndex++;
            break;

        case BossActionType.Swipe:
            ChangeState(Swipe());
            break;

        case BossActionType.GroundSmash:
            ChangeState(GroundSmash());
            break;

        case BossActionType.JumpSmash:
            ChangeState(JumpSmash());
            break;

        case BossActionType.RotateTowardsTarget:
            ChangeState(RotateTowardsTarget());
            break;

        case BossActionType.MoveTowardsTarget:
            ChangeState(MoveTowardsTarget());
            break;
        }
    }