public IEnumerator PlayCutscene(Cutscene[] scene)
        {
            counter = camCin.EndDuration;
            VariableContainer.variableContainer.currentActive.ChangeState(State.CUTSCENE);
            foreach (Cutscene c in scene)
            {
                camCin.AddCinematicTarget(c.cameraPoint, c.travelTime, c.holdTime, c.zoom, EaseType.EaseOut);
                counter += c.travelTime + c.holdTime;
            }
            camCin.Play();

            yield return(new WaitForSecondsRealtime(counter));

            camCin.RemoveAllCinematicTargets();
            VariableContainer.variableContainer.currentActive.ChangeState(State.CONTROL);
            yield return(null);
        }
Exemplo n.º 2
0
        void OnTriggerEnter(Collider other)
        {
            if (other.transform.CompareTag(PickupTag) && !Door.IsOpen)
            {
                Door.OpenDoor();

                if (Cinematics != null)
                {
                    Cinematics.Play();
                }

                Destroy(this.gameObject);
            }
        }
Exemplo n.º 3
0
 void OnCollisionEnter(Collision coll)
 {
     //1. 移动相机
     //2. 禁用player
     //3. 调用timeline
     //4. 还原player脚本
     //5. 销毁trigger
     if (coll.collider.tag == "Player")
     {
         pd.Play();
         camCinema.Play();
         List <int> blockstate = new List <int>();
         blockstate.Add(0);
         PlayerTestController.instance.BlockPlayerInput(blockstate);
     }
 }
Exemplo n.º 4
0
    void CameraBehaviour(Transform trans)
    {
        hacker.GetComponent <PlayerControl>().canControl = false;
        ai.GetComponent <PlayerControl>().canControl     = false;
        hacker.GetComponent <HealthSystem>().StartImmune();
        ai.GetComponent <HealthSystem>().StartImmune();

        ProCamera2DCinematics proCam = cam.GetComponent <ProCamera2DCinematics>();

        proCam.AddCinematicTarget(target.transform, 0f);

        proCam.Play();
        proCam.OnCinematicFinished.AddListener(StartMovement);
        proCam.OnCinematicFinished.AddListener(EndImmune);
        proCam.RemoveCinematicTarget(target.transform);
        CS.OnLinkedByPlayer -= CameraBehaviour;
    }
Exemplo n.º 5
0
        void OnGUI()
        {
            if (GUI.Button(new Rect(5, 5, 180, 30), (Cinematics.IsPlaying ? "Stop" : "Start") + " Cinematics"))
            {
                if (Cinematics.IsPlaying)
                {
                    Cinematics.Stop();
                }
                else
                {
                    Cinematics.Play();
                }
            }

            if (Cinematics.IsPlaying)
            {
                if (GUI.Button(new Rect(195, 5, 40, 30), ">"))
                {
                    Cinematics.GoToNextTarget();
                }
            }
        }
Exemplo n.º 6
0
 private void Start()
 {
     Cinematics.Play();
 }
Exemplo n.º 7
0
 public void playCinematics()
 {
     Cinematics.Play();
 }