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>(); } }
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>(); }