PlayerMoveScript
How do I use Player Move Script
Below are practical examples compiled from projects for learning and reference purposes
Featured Snippets
File name: CameraScript.cs
Copy
13 void Start () {
14 player = FindObjectOfType
15 lastPlayerPosition = player.transform.position;
16 }
File name: GameManagerScript.cs
Copy
63 public void resumeGame () {
64 pausePanel.SetActive (false);
65 scoreText.text = "Score: " + PlayerMoveScript.instance.scoreCount;
66 Time.timeScale = 1f;
67 }
File name: GameManagerScript.cs
Copy
84 public void SetScore () {
85 scoreText.text = "Score: " + PlayerMoveScript.instance.scoreCount;
86 }
File name: GameManagerScript.cs
Copy
97 public void ifPlayerDiedScore(int score) {
98 bestScore.text = "Best Score: " + PlayerMoveScript.instance.scoreCount;
99
100 if (score > Scores.instance.GetHighScore ()) {
101 Scores.instance.SetHighScore (score);
102 newHighScoreText.gameObject.SetActive (true);
103 highScoresImage.gameObject.SetActive (true);
104 audioSource.PlayOneShot (cheerClip);
105 Debug.Log ("New High Score");
106 }
107
108 bestScore.text = "Best Score: " + Scores.instance.GetHighScore ();
109 }
Download file with original file name:PlayerMoveScript
PlayerMoveScript 117 lượt xem
Gõ tìm kiếm nhanh...