void Start () { timesHit = 0; parent = GameObject.Find ("Effects"); if (!parent) parent = new GameObject ("Effects"); levelManager = GameObject.FindObjectOfType<LevelManager>(); if (!levelManager) Debug.LogError (this + ": unable to attach to LevelManager"); isBreakable = (this.tag == "breakable"); if (isBreakable) { levelManager.BrickCountPlus(); } }
void Start () { timesHit = 0; smoke = GameObject.Find("DoobieSmoke"); levelManager = GameObject.FindObjectOfType<LevelManager>(); if (!levelManager) Debug.LogError (this + ": unable to attach to LevelManager"); levelManager.BrickCountPlus(); parent = GameObject.Find ("Effects"); if (!parent) parent = new GameObject ("Effects"); }