private void OnDestroy() { PowerUpCollectedArgs powerupArgs = new PowerUpCollectedArgs(); powerupArgs.Effect = effectPickup; PowerupCollectable.OnPowerupCollected?.Invoke(this, powerupArgs); }
private void CallbackOnPowerupCollected(object _, PowerUpCollectedArgs args) { if (PICKUP_TYPE.LIVE == args.Effect) { var argsss = new OnPickupLivesUpdateArgs(); argsss.LivesToAdd = livesValue; OnPickupLivesUpdate?.Invoke(this, argsss); } }
private void CallbackOnPowerupCollected(object _, PowerUpCollectedArgs powerup) { if (PICKUP_TYPE.DOUBLE_FIRE_RATE == powerup.Effect) { StartCoroutine(Effect(this.secEffectDuration, this.rollingID)); var args = new OnPickupDoubleFireRateArgs(); args.Active = true; OnDoubleFireRateStateChange?.Invoke(this, args); } }
/// <summary> /// Adds the collectibles score value to the total score /// </summary> /// <param name="col">Sender object</param> /// <param name="args">event args</param> private void CallbackEffectPickup(object col, PowerUpCollectedArgs e) { this.levelScore++; // when a power up is picked up we add one point to the total score UpdateScore(this.levelScore); }