示例#1
0
        private void DoSafeExplosion(Vector2 position)
        {
            ExplosionData data = DataCloners.CopyExplosionData(GameManager.Instance.Dungeon.sharedSettingsPrefab.DefaultExplosionData);

            data.ignoreList.Add(Owner.specRigidbody);
            Exploder.Explode(position, data, Vector2.zero);
        }
示例#2
0
 protected override void OnPickedUpByPlayer(PlayerController player)
 {
     if (DataForProjectiles == null)
     {
         DataForProjectiles = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion);
     }
     if (!DataForProjectiles.ignoreList.Contains(player.specRigidbody))
     {
         DataForProjectiles.ignoreList.Add(player.specRigidbody);
     }
     base.OnPickedUpByPlayer(player);
 }
 private void Update()
 {
     foreach (Projectile proj in StaticReferenceManager.AllProjectiles)
     {
         if (proj && proj.Owner != null)
         {
             if (proj.Owner is PlayerController)
             {
                 if (proj.GetComponent <FerroboltOrbController>())
                 {
                     if (Vector2.Distance(proj.sprite.WorldCenter, m_projectile.sprite.WorldCenter) < 1)
                     {
                         ExplosionData boom = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion);
                         boom.ignoreList.Add(proj.Owner.specRigidbody);
                         Exploder.Explode(proj.sprite.WorldCenter, boom, Vector2.zero);
                         proj.DieInAir();
                         m_projectile.DieInAir();
                     }
                 }
             }
         }
     }
 }
示例#4
0
 private void OnHitEnemy(Projectile bullet, SpeculativeRigidbody enemy, bool fatal)
 {
     if (bullet.Owner is PlayerController && (bullet.Owner as PlayerController).PlayerHasActiveSynergy("Parallel Lines"))
     {
         if (UnityEngine.Random.value <= 0.1f)
         {
             if (UnityEngine.Random.value <= 0.5f)
             {
                 GameObject silencerVFX = (GameObject)ResourceCache.Acquire("Global VFX/BlankVFX_Ghost");
                 AkSoundEngine.PostEvent("Play_OBJ_silenceblank_small_01", base.gameObject);
                 GameObject       gameObject                = new GameObject("silencer");
                 SilencerInstance silencerInstance          = gameObject.AddComponent <SilencerInstance>();
                 float            additionalTimeAtMaxRadius = 0.25f;
                 silencerInstance.TriggerSilencer(bullet.specRigidbody.UnitCenter, 25f, 5f, silencerVFX, 0f, 3f, 3f, 3f, 250f, 5f, additionalTimeAtMaxRadius, bullet.Owner as PlayerController, false, false);
             }
             else
             {
                 ExplosionData data = DataCloners.CopyExplosionData(StaticExplosionDatas.explosiveRoundsExplosion);
                 data.ignoreList.Add(bullet.ProjectilePlayerOwner().specRigidbody);
                 Exploder.Explode(bullet.specRigidbody.UnitCenter, data, Vector2.zero);
             }
         }
     }
 }