コード例 #1
0
 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);
     }
 }
コード例 #2
0
 private void CallbackOnDoubleFireRateStateChange(object sender, OnPickupDoubleFireRateArgs args)
 {
     if (args.Active)
     {
         this.SetPowerupName("Double fire rate");
         this.SetPowerupImage(this.doubleFirerate);
     }
     else
     {
         this.ResetPowerup();
     }
 }
コード例 #3
0
 private void UpdateEffectOnController()
 {
     if (activeMultipliers > 0)
     {
         this.usedGunController.FireRate = initialFireRate * this.unitMultiplier * this.unitMultiplier;
     }
     else
     {
         this.usedGunController.FireRate = initialFireRate;
         var args = new OnPickupDoubleFireRateArgs();
         args.Active = false;
         OnDoubleFireRateStateChange?.Invoke(this, args);
     }
 }