//Set how we're going to behave. //For convenience, we're just going to assume we're in a Wave // and acta lie it. //Offset is a little offset from the targetPositions, so we don't have // waves all over each other. public void SetWaveAI(SpawnTDS.Wave parent, Vector3 offset) { //This actually gets called before Start, apparently. SetLifeState(LifeState.Entry); this.wave = parent; this.offset = offset; this.nextFire = 10000;//Time.time + Random.Range(0f, this.wave.at.fireInterval); }
// This is specially for switching the asteroid spawner on void W(SpawnTDS.FormationType f) { waveList.Add(new SpawnTDS.Wave(f)); }
/** Temporary(?) Elite control. It tries to follow what's in the wave. */ public void DoWave(SpawnTDS.Wave w) { this.wave = w; this.entryState = EntryState.Spawned; }
/** This is where I do things. Basic "define what you want and it's dealt with here */ void W(SpawnTDS.FormationType f, SpawnTDS.EntryBehavior en, SpawnTDS.LoiterBehavior l, SpawnTDS.AttackType a, SpawnTDS.ExitTrigger ext, SpawnTDS.ExitBehavior exb, float timeTillNextWave) { //Start // This will do things. waveList.Add(new SpawnTDS.Wave(f, en, l, a, ext, exb, timeTillNextWave)); }