Exemple #1
0
 private void OnRuntimeDestroy()
 {
     if (m_instance == this)
     {
         m_instance = null;
     }
 }
Exemple #2
0
 private void RuntimeAwake()
 {
     if (m_instance != null)
     {
         Debug.LogWarning("Another instance of Cubemen game exist");
         Destroy(m_instance);
         return;
     }
     m_instance = this;
 }
Exemple #3
0
        private void Start()
        {
            m_soul = transform.Find("Soul");
            m_skinnedMeshRenderer = GetComponentInChildren <SkinnedMeshRenderer>();
            m_rigidBody           = GetComponent <Rigidbody>();

            if (Game == null)
            {
                Game = FindObjectOfType <CubemenGame>();
            }
        }
Exemple #4
0
        private void OnDestroy()
        {
            if (m_instance == this)
            {
                m_instance = null;
            }

            if (BtnReplay != null)
            {
                BtnReplay.onClick.RemoveListener(RestartGame);
            }
        }