protected IEnumerator PowerUp(PowerUp powerUp) { // Engine unblown! engineBlown = false; riskAversion = powerUp.newRiskAversion; topSpeed = powerUp.newTopSpeed; yield return(MPAction.FlashAnimation(car, 0.5f, powerUpTime, startColor, Color.white, false, false, false)); riskAversion = normalRiskAversion; topSpeed = normalTopSpeed; }
private IEnumerator FlashSecurity(int numSecurity) { Color realClear = new Color(1f, 1f, 1f, 0f); foreach (GameObject securityGlow in securityGlows) { securityGlow.GetComponent <Image>().color = realClear; } for (; ;) { yield return(MPAction.FlashAnimation(securityGlows[numSecurity], 0.5f, 2f, realClear, Color.white, false, false, false)); } }