Exemple #1
0
    private void ApplyRecoveryBlinkEffect()
    {
        BlinkerEffect blink = Global.Instance("Effects/BlinkerEffect") as BlinkerEffect;

        blink.TimeToLive = _recoveryDuration;
        blink.Period     = 0.05f;
        blink.Die        = true;
        blink.Simple     = true;
        blink.Connect("Died", this, nameof(OnRecoveryBlinkerDied));
        AddChild(blink);
    }
Exemple #2
0
    private void ApplyPowerUpEffect(Color c)
    {
        RemoveBlinkers();
        Modulate = c;
        _ghost   = _invincible = false;
        BlinkerEffect blink = Global.Instance("Effects/BlinkerEffect") as BlinkerEffect;

        blink.TimeToLive = _powerUpDuration;
        blink.Period     = 0.1f;
        blink.Die        = true;
        blink.Simple     = true;
        blink.Delay      = _powerUpDuration - 3;
        AddChild(blink);
        blink.SetCustomBlink(BasicModulate);
        blink.Connect("Died", this, nameof(OnPowerUpBlinkerDied));
    }