MoveCameraBackToStart









How do I use Move Camera Back To Start
Below are practical examples compiled from projects for learning and reference purposes

Featured Snippets


File name: CameraFollow.cs Copy
30  void Update () {
31   if (GameplayController.instance.gameInProgress) {
32    if (isFollowing) {
33     if (GameObject.FindGameObjectWithTag ("Player Bullet") != null) {
34      MoveCameraFollow ();
35     }
36    } else {
37     if (!GameplayController.instance.player.GetChild (0).transform.GetComponent ().readyToShoot) {
38      MoveCameraBackToStart ();
39      AfterShotMoveAgain ();
40      allowToMove = false;
41     } else {
42      timeSinceShot = 0;
43      allowToMove = true;
44     }
45
46    }
47
48    if (Application.platform == RuntimePlatform.Android) {
49     TouchMoveCamera ();
50    } else if (Application.platform == RuntimePlatform.WindowsEditor) {
51     MoveCamera ();
52    }
53   }
54
55  }
File name: CameraFollow.cs Copy
63  void MoveCameraBackToStart(){
64   transform.position = Vector3.MoveTowards (transform.position, startPosition, Time.deltaTime * 5f);
65  }

MoveCameraBackToStart 144 lượt xem

Gõ tìm kiếm nhanh...