Пример #1
0
    protected void Awake()
    {
        if (instance != null)
        {
            Destroy(gameObject);
        }
        else
        {
            instance = this;
        }

        m_player = GetComponent <Player>();
    }
Пример #2
0
 protected void OnDestroy()
 {
     instance = null;
 }