void ManageIn(Collider2D other) { if (!isIn && !CharacterManager.Instance.firstRun) { if (CompareDefinition(other)) { isIn = true; spriteAngry = other.GetComponentInChildren <ChangeSpriteInAnimation>(); if (spriteAngry.isActive) { return; } AddCallbackRestorte(); character = other.GetComponent <CharacterInputController>(); move = other.GetComponent <MoveStateKlaus>(); anim = other.GetComponentInChildren <Animator>(); character.isBlock = true; character.enabled = false; move.BlockThrow = true; character.SetNoInput(); CameraFollow.Instance.ChangueTargetOnly(other.transform, (TimeToAngry + TimeToBackK1)); currentZoom = DynamicCameraManager.Instance.ZoomKlaus; DynamicCameraManager.Instance.ChangueZoomToKlaus(ZoomForKlaus, TimeToAngry * PercentTimeToZoomKlaus); anim.SetBool("Angry", true); if (sfx1 != null && sfx2 != null) { sfx1.Play(); sfx2.Play(); } StartCoroutine("AngryControllerActive"); } } }
protected override void Awake() { base.Awake(); stateID = StateID.Throw; AddTransition(Transition.ThrowToMove, StateID.Move); AddTransition(Transition.MoveToDead, StateID.Dead); bodyToForce = FindObjectOfType <MoveStateKlaus>(); Arrow = (Transform)Instantiate(Arrow, transform.position, transform.rotation); Arrow.parent = transform; Arrow.gameObject.SetActive(false); }