Esempio n. 1
0
        protected override void Init(MyObjectBuilder_DefinitionBase builder)
        {
            base.Init(builder);

            var ob = builder as MyObjectBuilder_ProjectileAmmoDefinition;

            MyDebug.AssertDebug(ob != null);

            this.AmmoType = MyAmmoType.HighSpeed;

            MyObjectBuilder_ProjectileAmmoDefinition.AmmoProjectileProperties projectileProperties = ob.ProjectileProperties;
            MyDebug.AssertDebug(projectileProperties != null);

            this.ProjectileHealthDamage           = projectileProperties.ProjectileHealthDamage;
            this.ProjectileHitImpulse             = projectileProperties.ProjectileHitImpulse;
            this.ProjectileMassDamage             = projectileProperties.ProjectileMassDamage;
            this.ProjectileOnHitMaterialParticles = MyParticleEffects.GetCustomHitMaterialMethodById((int)projectileProperties.ProjectileOnHitMaterialParticlesType);
            this.ProjectileOnHitParticles         = MyParticleEffects.GetCustomHitParticlesMethodById((int)projectileProperties.ProjectileOnHitParticlesType);
            this.ProjectileTrailColor             = projectileProperties.ProjectileTrailColor;
            this.ProjectileTrailMaterial          = projectileProperties.ProjectileTrailMaterial;
            this.ProjectileTrailProbability       = projectileProperties.ProjectileTrailProbability;
            this.ProjectileTrailScale             = projectileProperties.ProjectileTrailScale;
            this.HeadShot = projectileProperties.HeadShot;
            this.ProjectileHeadShotDamage = projectileProperties.ProjectileHeadShotDamage;
            this.ProjectileType           = projectileProperties.ProjectileType;
        }
Esempio n. 2
0
        protected override void Init(MyObjectBuilder_DefinitionBase builder)
        {
            base.Init(builder);

            var ob = builder as MyObjectBuilder_ProjectileAmmoDefinition;
            MyDebug.AssertDebug(ob != null);

            this.AmmoType = MyAmmoType.HighSpeed;

            MyObjectBuilder_ProjectileAmmoDefinition.AmmoProjectileProperties projectileProperties = ob.ProjectileProperties;
            MyDebug.AssertDebug(projectileProperties != null);

            this.ProjectileHealthDamage = projectileProperties.ProjectileHealthDamage;
            this.ProjectileHitImpulse = projectileProperties.ProjectileHitImpulse;
            this.ProjectileMassDamage = projectileProperties.ProjectileMassDamage;
            this.ProjectileOnHitMaterialParticles = MyParticleEffects.GetCustomHitMaterialMethodById((int)projectileProperties.ProjectileOnHitMaterialParticlesType);
            this.ProjectileOnHitParticles = MyParticleEffects.GetCustomHitParticlesMethodById((int)projectileProperties.ProjectileOnHitParticlesType);
            this.ProjectileTrailColor = projectileProperties.ProjectileTrailColor;
            this.ProjectileTrailMaterial = projectileProperties.ProjectileTrailMaterial;
            this.ProjectileTrailProbability = projectileProperties.ProjectileTrailProbability;
            this.ProjectileTrailScale = projectileProperties.ProjectileTrailScale;
            this.HeadShot = projectileProperties.HeadShot;
            this.ProjectileHeadShotDamage = projectileProperties.ProjectileHeadShotDamage;
            this.ProjectileType = projectileProperties.ProjectileType;
        }