コード例 #1
0
        public void Start(float playerDamage, float damage, float empDamage, MyExplosionTypeEnum type, BoundingSphere explosionSphere, int lifespanInMiliseconds, MyExplosionForceDirection explosionForceDirection, MyGroupMask groupMask, bool createExplosionDebris, int cascadeLevel = 0, MyEntity hitEntity = null, float particleScale = 1.0f, MyEntity ownerEntity = null, bool affectVoxels = true, bool applyForceAndDamage = true, bool createDecals = true, Vector3?direction = null, bool forceDebris = false, bool playSound = false)
        {
            MyExplosionInfo info = new MyExplosionInfo(playerDamage, damage, empDamage, explosionSphere, type, playSound)
            {
                LifespanMiliseconds     = lifespanInMiliseconds,
                ExplosionForceDirection = explosionForceDirection,
                GroupMask        = groupMask,
                ExplosionFlags   = MyExplosionFlags.CREATE_PARTICLE_EFFECT,
                CascadeLevel     = cascadeLevel,
                HitEntity        = hitEntity,
                ParticleScale    = particleScale,
                OwnerEntity      = ownerEntity,
                Direction        = direction,
                VoxelCutoutScale = 1.0f,
            };

            info.AffectVoxels         = affectVoxels;
            info.ApplyForceAndDamage  = applyForceAndDamage;
            info.CreateDebris         = createExplosionDebris;
            info.CreateDecals         = createDecals;
            info.ForceDebris          = forceDebris;
            info.VoxelExplosionCenter = explosionSphere.Center;
            Start(ref info);
        }
コード例 #2
0
ファイル: MyExplosion.cs プロジェクト: Bunni/Miner-Wars-2081
 public void Start(float playerDamage, float damage, float empDamage, MyExplosionTypeEnum type, BoundingSphere explosionSphere, int lifespanInMiliseconds, MyExplosionForceDirection explosionForceDirection, MyGroupMask groupMask, bool createExplosionDebris, int cascadeLevel = 0, MyEntity hitEntity = null, float particleScale = 1.0f, MyEntity ownerEntity = null, bool affectVoxels = true, bool applyForceAndDamage = true, bool createDecals = true, Vector3? direction = null, bool forceDebris = false, bool playSound = false)
 {
     MyExplosionInfo info = new MyExplosionInfo(playerDamage, damage, empDamage, explosionSphere, type, playSound)
     {
         LifespanMiliseconds = lifespanInMiliseconds,
         ExplosionForceDirection = explosionForceDirection,
         GroupMask = groupMask,
         ExplosionFlags = MyExplosionFlags.CREATE_PARTICLE_EFFECT,
         CascadeLevel = cascadeLevel,
         HitEntity = hitEntity,
         ParticleScale = particleScale,
         OwnerEntity = ownerEntity,
         Direction = direction,
         VoxelCutoutScale = 1.0f,
     };
     info.AffectVoxels = affectVoxels;
     info.ApplyForceAndDamage = applyForceAndDamage;
     info.CreateDebris = createExplosionDebris;
     info.CreateDecals = createDecals;
     info.ForceDebris = forceDebris;
     info.VoxelExplosionCenter = explosionSphere.Center;
     Start(ref info);
 }