Example #1
0
	void ScoreAndDestroy () {
		// TODO typical time to randomly "drop a bonus"
		levelManager = GameObject.FindObjectOfType<LevelManager>(); // why the heck do I need this here to prevent exception faults?
			if (!levelManager) Debug.LogError ("LEVEL_MANAGER_FAIL");
		levelManager.ChangeScore(10f); // TODO multiply by wace#, ergo move wave# into LevelManager
		AudioSource.PlayClipAtPoint (scuttle, transform.position);
		levelManager.EnemyDown();
		Destroy(this.gameObject, 0.001f);
	}