void Awake() { lineRenderer = GetComponent <LineRenderer> (); interceptSpawn = GetComponent <InterceptSpawn> (); // laserParticleSystem = GetComponentInChildren<ParticleSystem> (); // if (laserParticleSystem) { // ParticleList = new ParticleSystem.Particle[laserParticleSystem.maxParticles]; // } // interceptSpawn = GetComponent<InterceptSpawn> (); }
public IEnumerator UltimateIntercept(){ InterceptSpawn interceptSpawn = GetComponentInChildren<InterceptSpawn> (); //interceptSpawn.laserCooldown = paramManager.SpawnerSpecialEffectRate; interceptSpawn.laserEnabled = true; while (unit.paramManager.ManaPoints > 0.0f && specialProcessActive) { unit.ChangeMana (-1); yield return new WaitForSeconds (paramManager.SpawnerSpecialDurationFactor); } unit.unitState.SelfExitState(RTS.EAnimation.SpawnerSpecial); // interceptSpawn.laserCooldown = paramManager.SpawnCooldown; interceptSpawn.laserEnabled = false; }