Пример #1
0
    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;
    }
Пример #2
0
    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));
        }
    }