void Start() { FinisherCount = FinisherTime; FinisherModeCooldownCount = FinisherModeCooldownTime; CurrentFinisherMode = FinisherModes.Runic; inFinisherMode = false; PerformingFinisher = false; ExecutingFinisher = false; FinisherFullImage.SetActive(false); FinisherIcon.gameObject.SetActive(true); FinisherIcon.SetActivated(false); InFinisherIcons.SetActive(false); PrimaryAttackPopUp.SetActive(false); //RunicSequence = new RunicInputHelper(); RunicQue = new List <Direction>(); }
IEnumerator LeavingFinisherMode(FinisherAbstract finisherAbstractUsed = null) { UIanim.Play("idle"); if (didFail) { CharAnim.Play("Finisher_End"); yield return(new WaitForSecondsRealtime(1f)); CharAnim.Play("Idle"); } Player.GetComponent <PlayerMovementController>().AllowMoving(); //MARK: barely noticable bug where if you move and do flamethrower finisher, you may move for 1 frame Player.GetComponent <PlayerMovementController>().AllowTurning(); if (!PillarFinisherUsed) { if (currentTarget.tag != "TargetDummy") { if (finisherAbstractUsed != null && (finisherAbstractUsed is Siphoncut)) //electricity is used for siphoning for now { currentTarget.GetComponent <EnemyAI>().KillEnemy(true); } else { currentTarget.GetComponent <EnemyAI>().KillEnemy(); enemyAnimator.Play("Death"); if (currentTarget.GetComponent <EnemyTypeController>().MyEnemyType == EnemyType.Boss) { currentTarget.GetComponent <EnemyAI>().anim.runtimeAnimatorController = savedAnimController; } } } else { Destroy(currentTarget); } if (currentTarget != null) { currentTarget.transform.parent = null; if (currentTarget.GetComponent <EnemyAI>() != null) { currentTarget.GetComponent <EnemyAI>().ChangeStatus(EnemyBehaviorStatus.PrimaryAttacker); currentTarget.GetComponent <EnemyMovementController>().HelpKnockback(); } } } else if (!didFail) //TutorialPopupStuff { Invoke("HidePopup", 4f); gameStatus.CheckpointP = currentTarget.transform.position + currentTarget.transform.forward * 2; Invoke("SaveGame", 2f); IncreaseFinisherMeter(100); Instantiate(postShrine, currentTarget.transform.position, currentTarget.transform.rotation); Destroy(currentTarget); } else { Invoke("HidePopup", 0f); } didFail = false; inFinisherMode = false; ExecutingFinisher = false; PillarFinisherUsed = false; CurrentFinisherMode = FinisherModes.Runic; currentTarget = null; yield return(null); swordController.ResumeAttacking(); if (GameStatus.InCombat) { cam.SwitchCombatLocation(); } else { cam.SwitchCombatLocation(); } FinisherModeCooldownCount = 0; Time.timeScale = 1; GameStatus.FinisherModeActive = false; }