// Use this for initialization void Start () { if (sMeter == null) GetComponentInChildren<SacrificeMeter>(); if (sMeter == null) Debug.LogWarning(" There is no Sacrifice Meter reference attached to: " + name); spawner = TempResourcesSpawner.instance; }
void Awake() { if (_instance == null) _instance = this; else { Debug.LogWarning ( "Second instance of singleton type: " + this.GetType() + " \r\n Destroying! "); Destroy(this); return; } }
// Use this for initialization void Start () { spawner = TempResourcesSpawner.instance; }