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

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

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