public void leftDetectionRange(AirStream stream) { if (!isInAirstream) { resetMotors(); } if (detectedAirStream == stream) { detectedAirStream = null; } detectedAirStreams.Remove(stream); stream.inDetectionRange.Remove(this); stream.leaveParticleStream(this); detectedAirstreamsCount--; }
/// <summary> /// Frame when Deltaflyer left an airstream /// </summary> public void leftAirstream() { foreach (AirStream stream in detectedAirStreams) { stream.leaveParticleStream(this); } currentAirStream.leaveParticleStream(this); currentAirStream.inAirstream.Remove(this); currentAirStream = null; inputMngr.velocity /= 2; //foreach (AirStream tmpAs in detectedAirStreams) //{ // tmpAs.notifyParticles.gameObject.SetActive(false); //} }