Example #1
0
    public override void TryStartAction(int actionIndex)
    {
        if (actionIndex == 0)
        {
            if (MainLauncher.TryLaunch(transform.position, transform.rotation))
            {
                SecondaryLauncher.timeRemaining = SecondaryLauncher.launchInterval;
                animator.SetTrigger("Punch");

                if (!BossMeleeSource.isPlaying)
                {
                    BossMeleeSource.PlayDelayed(1.0f);
                }
                else
                {
                    BossMeleeSource.Stop();
                }
            }
        }
        if (actionIndex == 1)
        {
            if (SecondaryLauncher.TryLaunch(transform.position, transform.rotation))
            {
                MainLauncher.timeRemaining = MainLauncher.launchInterval;
                animator.SetTrigger("Punch");

                if (!BossMeleeSource.isPlaying)
                {
                    BossMeleeSource.PlayDelayed(1.0f);
                }
                else
                {
                    BossMeleeSource.Stop();
                }
            }
        }
    }