Example #1
0
 public void Awake()
 {
     if(_instance != null) {
         Debug.LogError("Can't have multiple players in a scene");
         Destroy(gameObject);
         return;
     }
     _instance = this;
 }
Example #2
0
 public void Start()
 {
     cc = GetComponent<CharacterController2D>();
     player = GetComponent<Player>();
 }