public override void TryStartAction(int actionIndex) { if (handleInput) { if (actionIndex == 0) { MainLauncher.TryLaunch(transform.position, transform.rotation); if (!VillagerAttackSource.isPlaying) { VillagerAttackSource.PlayDelayed(0.1f); } else { VillagerAttackSource.Stop(); } } } }
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(); } } } }