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