public override void Draw() { int num = MySandboxGame.TotalGamePlayTimeInMilliseconds - this.m_rifleGun.LastTimeShoot; MyGunBase gunBase = this.m_rifleGun.GunBase; if (gunBase.UseDefaultMuzzleFlash && (num <= gunBase.MuzzleFlashLifeSpan)) { GenerateMuzzleFlash(gunBase.GetMuzzleWorldPosition(), (Vector3)gunBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } }
public override void Draw() { // Draw muzzle flash int deltaTime = MySandboxGame.TotalGamePlayTimeInMilliseconds - m_rifleGun.LastTimeShoot; MyGunBase rifleBase = m_rifleGun.GunBase; if (deltaTime <= rifleBase.MuzzleFlashLifeSpan) { if (MySandboxGame.Config.GraphicsRenderer == MySandboxGame.DirectX9RendererKey) { MyParticleEffects.GenerateMuzzleFlashLocal(Container.Entity, rifleBase.GetMuzzleLocalPosition(), Vector3.Forward, 0.1f, 0.3f); } else { MyParticleEffects.GenerateMuzzleFlash(rifleBase.GetMuzzleWorldPosition(), rifleBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } } }
public override void Draw() { // Draw muzzle flash int deltaTime = MySandboxGame.TotalGamePlayTimeInMilliseconds - m_rifleGun.LastTimeShoot; MyGunBase rifleBase = m_rifleGun.GunBase; if (rifleBase.UseDefaultMuzzleFlash && deltaTime <= rifleBase.MuzzleFlashLifeSpan) { MyParticleEffects.GenerateMuzzleFlash(rifleBase.GetMuzzleWorldPosition(), rifleBase.GetMuzzleWorldMatrix().Forward, 0.1f, 0.3f); } }