Пример #1
0
    void Awake()
    {
        //Singletone
        if (ins == null)
        {
            ins = this; DontDestroyOnLoad(gameObject);
        }
        else
        {
            Destroy(gameObject);
        }

        if (lifeController == null)
        {
            lifeController = GetComponent <VisualLifeController>();
        }

        if (unitsManager == null)
        {
            unitsManager = GetComponent <UnitsManager>();
        }
    }
Пример #2
0
    void Awake()
    {
        //Singletone
        if (ins == null) { ins = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); }

        if (lifeController==null)
        lifeController = GetComponent<VisualLifeController>();

        if (unitsManager == null)
            unitsManager = GetComponent<UnitsManager>();
    }