Exemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        if (CurrentScene)
        {
            switch (State)
            {
            case cutsceneState.lerpIn:
                float t = (Time.time - lerpBeginTimestamp) / lerpTime;
                transform.localPosition = Vector3.Lerp(lerpStartPosition, Vector3.zero, t);
                transform.localRotation = Quaternion.Lerp(lerpStartRotation, Quaternion.identity, t);
                if (t >= lerpTime)
                {
                    State = cutsceneState.playing;
                }
                break;

            case cutsceneState.lerpOut:
                break;

            case cutsceneState.playing:
                break;

            case cutsceneState.stopped:
                break;
            }
        }
    }
Exemplo n.º 2
0
 public void playScene(cutsceneZone scene)
 {
     CurrentScene     = scene;
     transform.parent = CurrentScene.CameraDock;
     State            = cutsceneState.lerpIn;
 }