コード例 #1
0
    public void AwakenReaction()
    {
        if (LeftEye.activeInHierarchy || RightEye.activeInHierarchy)
        {
            //cannot wake again!
            return;
        }
        MainCameraController.ShakeCameraEpic();

        //Jolt
        LeanTween.rotateLocal(cogsHolder, cogWobble.localEulerAngles, 0.2f).setEaseOutBack().setLoopPingPong(1);
        //Animate
        OpenEyes();
        //rotate for pain
        LeanTween.rotate(LeftEye, Vector3.down, 0.2f).setEase(LeanTweenType.easeInSine).setLoopPingPong(1);
        LeanTween.rotate(RightEye, Vector3.down, 0.2f).setEase(LeanTweenType.easeInSine).setLoopPingPong(1).setOnComplete(() =>
        {
            StartCoroutine(BlinkEyes(0.5f));
        });
    }