public void MuzzleFlash(GridCoordinates grid, Angle angle) { if (_muzzleFlashSprite == null) { return; } var time = IoCManager.Resolve <IGameTiming>().CurTime; var deathTime = time + TimeSpan.FromMilliseconds(200); // Offset the sprite so it actually looks like it's coming from the gun var offset = angle.ToVec().Normalized / 2; var message = new EffectSystemMessage { EffectSprite = _muzzleFlashSprite, Born = time, DeathTime = deathTime, Coordinates = grid.Translated(offset), //Rotated from east facing Rotation = (float)angle.Theta, Color = Vector4.Multiply(new Vector4(255, 255, 255, 255), 1.0f), ColorDelta = new Vector4(0, 0, 0, -1500f), Shaded = false }; EntitySystem.Get <EffectSystem>().CreateParticle(message); }