public override void SetData(LevelEnemyDataCollection data) { if (data.pattern == 1) { patternDir = 1; transform.position = new Vector3(-7, 11, 0); } if (data.pattern == 2 || data.pattern == 3) { patternDir = -1; transform.position = new Vector3(7, 11, 0); } // Boss music (temp maybe) if (audioHandler == null) audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandler>(); audioHandler.SwapMusicTrack(-1); }
public override void SetData(LevelEnemyDataCollection data) { if (data.pattern == 1) { pattern = AIpattern.RANDOM; transform.position = new Vector3(Random.Range(-10F, 10F), 10, 0); } if (data.pattern == 2 || data.pattern == 3) { pattern = AIpattern.WAVE; patternDir = (data.pattern == 2) ? 1 : -1; transform.position = new Vector3(-11 * patternDir, 6, 0); } // Level music (temp maybe) if (audioHandler == null) audioHandler = GameObject.Find("AudioHandler").GetComponent<AudioHandler>(); audioHandler.SwapMusicTrack(0); if (Random.Range(0, 3) == 1) { audioHandler.PlaySound("Imps laughing"); ; } }
public virtual void SetData(LevelEnemyDataCollection data) {}