private IEnumerator SpawnTargets(PlayerController player, Gun gun)
        {
            float num = (gun.reloadTime.RoundToNearest(1) - 1) * 2;

            for (int i = 0; i < (gun.reloadTime.RoundToNearest(1) - 1) * 2; i++)
            {
                Vector2 position = player.CurrentRoom.GetRandomVisibleClearSpot(1, 1).ToVector2();
                targetObjects.Add(UnityEngine.Object.Instantiate <GameObject>(PrizeRifle.targetPrefab, position, Quaternion.identity));
                tk2dBaseSprite targetSprite = targetObjects[i].GetComponent <tk2dBaseSprite>();
                SpriteOutlineManager.AddOutlineToSprite(targetSprite, Color.white);
                LootEngine.DoDefaultItemPoof(targetSprite.WorldCenter, false, false);
                SpeculativeRigidbody body = targetObjects[i].GetComponent <SpeculativeRigidbody>();
                body.OnRigidbodyCollision += this.HandleRigidbodyCollision;
            }
            for (int i = 0; i < (gun.reloadTime.RoundToNearest(1) - 1) * 2; i++)
            {
                yield return(new WaitForSeconds(0.5f));

                GameObject obj3  = SpawnManager.SpawnProjectile(gun.DefaultModule.projectiles[0].gameObject, (gun.CurrentOwner as PlayerController).sprite.WorldCenter, Quaternion.Euler(0f, 0f, gun.CurrentAngle));
                Projectile proj3 = obj3.GetComponent <Projectile>();
                proj3.Owner = gun.CurrentOwner;
                proj3.collidesWithEnemies = false;
                if (proj3.gameObject.GetComponent <BounceProjModifier>() != null)
                {
                    BounceProjModifier boing = proj3.GetComponent <BounceProjModifier>();
                    proj3.ChangeTintColorShader(0f, BraveUtility.GetRainbowColor(boing.numberOfBounces));
                    boing.OnBounceContext += this.OnBounce;
                }
            }
        }
 public override void PostProcessProjectile(Projectile projectile)
 {
     base.PostProcessProjectile(projectile);
     projectile.baseData.damage *= damageBoost;
     if (projectile.gameObject.GetComponent <BounceProjModifier>() != null)
     {
         BounceProjModifier boing = projectile.GetComponent <BounceProjModifier>();
         projectile.ChangeTintColorShader(0f, BraveUtility.GetRainbowColor(boing.numberOfBounces));
         boing.OnBounceContext += this.OnBounce;
     }
 }
        private void OnBounce(BounceProjModifier boing, SpeculativeRigidbody body)
        {
            int num = boing.numberOfBounces;

            boing.projectile.ChangeTintColorShader(0f, BraveUtility.GetRainbowColor(num));
        }