Spaces:
Running
Running
| using UnityEngine; | |
| public class Player : MonoBehaviour | |
| { | |
| public static Player Instance; | |
| void Awake() | |
| { | |
| if (Instance == null) | |
| Instance = this; | |
| else | |
| Destroy(gameObject); | |
| } | |
| } | |