private void    OnMenuAction()
    {
        if (this.Animating)
        {
            return;
        }
        this.Animating = true;
        MenuElement me = this.GetComponent <MenuElement>();

        me.Focus();

        this.Door.Open();
        iTween.MoveTo(Camera.main.gameObject, iTween.Hash(
                          "position", AnimationCameraAnchor,
                          "looktarget", AnimationCameraLookAtAnchor,
                          "time", 1.0f,
                          "looktime", 1.0f,
                          "delay", 0.5f,
                          "easetype", iTween.EaseType.easeOutQuad,
                          "oncompletetarget", this.gameObject,
                          "oncomplete", "OnAnimationDone"
                          ));
        iTween.CameraFadeAdd();
        iTween.CameraFadeDepth(12);
        iTween.CameraFadeTo(iTween.Hash(
                                "amount", 1.0f,
                                "time", 1.0f,
                                "delay", 0.5f,
                                "easetype", iTween.EaseType.easeInOutExpo,
                                "oncompletetarget", this.gameObject,
                                "oncomplete", "OnFadeOutDone"
                                ));
    }
Exemple #2
0
    private void    OnMenuAction()
    {
        if (this.Animating)
        {
            return;
        }
        this.Animating = true;
        MenuElement me = this.GetComponent <MenuElement>();

        me.Focus();

        this.PushButton.Push();
        iTween.MoveTo(Camera.main.gameObject, iTween.Hash(
                          "position", FirstStepCameraAnchor,
                          "looktarget", FirstStepCameraLookAtAnchor,
                          "time", 1.0f,
                          "looktime", 1.0f,
                          "delay", 1.0f,
                          "easetype", iTween.EaseType.easeOutQuad,
                          "oncompletetarget", this.gameObject,
                          "oncomplete", "OnFirstStepAnimationDone"
                          ));
    }