예제 #1
0
	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(); }
	}
예제 #2
0
	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");
	}