void FixedUpdate() { GameObject[] activePickups = GameObject.FindGameObjectsWithTag("Pickup"); if (activePickups.Length < this.MaxSimultaneous) { this.timeUntilNext -= Time.fixedDeltaTime; if (this.timeUntilNext < 0) { this.timeUntilNext = this.TimeBetween; var go = GameObject.Instantiate(this.randomPickup, RandomExt.Pick(this.SpawnPoints), Quaternion.identity) as GameObject; var pickup = go.GetComponent <Pickup>(); pickup.ExpirationTime = Time.time + this.TimeToLive; pickup.StartBlinkTime = pickup.ExpirationTime - this.TimeToBlink; } } }