public void ActivatePowerUp(PowerUp power) { if (power == null) { Debug.LogError("Error: Power is Null (probably)"); return; } if (!activePowers.Contains (power) && activePowers.Count < maxAmtPow) { activePowers.Add (power); power.Start(); gameObject.AddComponent (power.GetType ()); // Debug.Log("Adding: " + power.ToString ()); if (goodPowerUpIDs.Contains(power.getPowerUpID())){ powerUpParticles.startColor = Color.green; } else if (neutralPowerUpIDs.Contains(power.getPowerUpID())){ powerUpParticles.startColor = Color.yellow; } else if (badPowerUpIDs.Contains(power.getPowerUpID())){ powerUpParticles.startColor = Color.red; } powerUpParticles.enableEmission = true; } }