Esempio n. 1
0
 private void Awake()
 {
     if (Instance == null)
     {
         Instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
Esempio n. 2
0
    void Awake()
    {
        GameObject managerObject = GameObject.Find("ControllManager");
        if (managerObject == null){
            Debug.Log ("Nope");
            return;
        }

        m_ControllManager = managerObject.GetComponent<ControllManager>();
        if(m_ControllManager == null){
            Debug.Log ("Haha");
            return;
        }
        m_ControllManager.RegisterCharacter(this);
        Debug.Log ("Got it!");
    }