コード例 #1
0
    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");
            }
        }
    }