AfterShotMoveAgain
How do I use After Shot Move Again
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
Line | Code | Ex.. |
---|---|---|
39 | AfterShotMoveAgain (); | 1 |
67 | void AfterShotMoveAgain(){ | 2 |
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
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
67 void AfterShotMoveAgain(){
68 timeSinceShot += Time.deltaTime;
69 if (timeSinceShot > 2f) {
70 if(startPosition == transform.position){
71 GameplayController.instance.player.GetChild (0).transform.GetComponent
72 }
73 }
74 }
AfterShotMoveAgain 130 lượt xem
Gõ tìm kiếm nhanh...