예제 #1
0
	void Start () {
		levelManager = GameObject.FindObjectOfType<LevelManager>(); 
			if (!levelManager) Debug.LogError ("Enemy Controller Start !levelManager");
		myRenderer = GetComponent<SpriteRenderer>();
			if (!myRenderer) Debug.LogError ("Enemy Controller Start !myRenderer");

		insane = levelManager.insane;

		armed = true;
		bombSpeed = 6f;
		dearmed = false;
		fireDelay = 0.2f;
		fireTime = Time.time;
		maxHealth = 111f;

		myWave = levelManager.GetWaveNumber();

		// difficulty tuning: increases each wave
		fireDelay = 1 / (myWave * 0.3f);
		maxHealth += (myWave * 1.7f);
		hitPoints = maxHealth;
	}