Beispiel #1
0
 private void FixedUpdate()
 {
     if (detected)
     {
         cinematic.Show(200, 0.8f);
         canvas.SetActive(false);
         camera.enabled = false;
         var desactivate = GameObject.FindGameObjectsWithTag("player");
         for (int i = 0; i < desactivate.Length; i++)
         {
             desactivate[i].GetComponent <Player_Movement>().Stop_Moving();
         }
         camera.transform.position = Vector3.SmoothDamp(Camera.main.transform.position, new Vector3(Boss.transform.position.x, Boss.transform.position.y - offsetCamera, camera.transform.position.z), ref velocity, smoothTime);
         Boss.transform.position   = Vector2.Lerp(Boss.transform.position, new Vector2(Boss.transform.position.x, Boss.transform.position.y - 0.082f), 0.5f);
         offsetCamera = Mathf.Lerp(offsetCamera, 2.5f, 0.007f);
         timer       += Time.deltaTime;
         if (timer > timerTot)
         {
             for (int i = 0; i < desactivate.Length; i++)
             {
                 if (Boss.GetComponent <Collider2D>().GetType() == typeof(CapsuleCollider2D))
                 {
                     Boss.GetComponent <Collider2D>().enabled = true;
                 }
             }
             combatBoss.enabled = true;
             Boss.GetComponent <Animator>().enabled = true;
             Destroy(this);
         }
     }
 }
Beispiel #2
0
 public static void Show_Static(float targetSize, float time)
 {
     if (instance != null)
     {
         instance.Show(targetSize, time);
     }
 }
    // Start is called before the first frame update
    void Start()
    {
        levelUI = LevelUI.GetInstance();

        levelUI.AnnouncerTextLine.gameObject.SetActive(false);
        levelUI.healthSliders[0].gameObject.SetActive(false);
        levelUI.healthSliders[1].gameObject.SetActive(false);
        levelUI.LevelTimer.gameObject.SetActive(false);

        fade.SetActive(true);
        bars = GetComponentInChildren <CinematicBars>();
        bars.Show(200, 1);

        anim = GetComponent <Animator>();

        //player_1.GetComponent<StateManager>().dontMove = true;
        //player_2.GetComponent<StateManager>().dontMove = true;

        DisableFighters();


        cam        = GetComponentInChildren <Camera>();
        lm         = GetComponent <LevelManager>();
        lm.enabled = false;


        anim.SetInteger("Location", 1);
    }
Beispiel #4
0
 private void Update()
 {
     cinematic.Show(200, 0.8f);
     if (Vector3.Distance(transform.position, target.transform.position) < distance)
     {
         i++;
         if (i < targets.Count)
         {
             target = targets[i];
         }
     }
     if (i == targets.Count)
     {
         canvas.SetActive(true);
         for (int j = 0; j < playersList.Count; j++)
         {
             playersList[j].Allow_Moving();
         }
         GetComponent <Camera_Focus>().enabled = true;
         gameObject.GetComponent <travellingCamera>().enabled = false;
     }
 }
Beispiel #5
0
 private void Update()
 {
     cinematic.Show(200, 0.8f);
 }
 public void DialogueCameraOn()
 {
     gameTime.paused = true;
     bars.Show(Screen.height / 4, 0.4f);
     bars.StartCoroutine("ZoomIn");
 }