internal static void DrawThunderEffect() { if (DrawThunder > 0) { Sprite tmpSprite = default(Sprite); tmpSprite = new Sprite(new Texture(new SFML.Graphics.Image(C_Graphics.GameWindow.Size.X, C_Graphics.GameWindow.Size.Y, SFML.Graphics.Color.White))) { Color = new Color((byte)255, (byte)255, (byte)255, (byte)150), TextureRect = new IntRect(0, 0, (int)C_Graphics.GameWindow.Size.X, (int)C_Graphics.GameWindow.Size.Y), Position = new Vector2f(0, 0) }; C_Graphics.GameWindow.Draw(tmpSprite); // DrawThunder--; tmpSprite.Dispose(); } }
/// <summary> /// Releases used resources /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (left != null) { left.Dispose(); left = null; } if (right != null) { right.Dispose(); right = null; } if (textDrawer != null) { textDrawer.Dispose(); textDrawer = null; } } }
/// <summary> /// Dispose of resources /// </summary> protected override void Dispose(bool disposing) { if (disposing) { if (glowSprite != null) { glowSprite.Dispose(); glowSprite = null; } if (this.flares != null) { for (int i = 0; i < this.flares.Length; i++) { this.flares[i]?.Dispose(); this.flares[i] = null; } this.flares = null; } } }
internal static void DrawThunderEffect() { if (E_Globals.InMapEditor) { return; } if (E_Globals.DrawThunder > 0) { Sprite tmpSprite = default(Sprite); tmpSprite = new Sprite(new Texture(new SFML.Graphics.Image(E_Graphics.GameWindow.Size.X, E_Graphics.GameWindow.Size.Y, SFML.Graphics.Color.White))) { Color = new SFML.Graphics.Color(255, 255, 255, 150), TextureRect = new IntRect(0, 0, (int)E_Graphics.GameWindow.Size.X, (int)E_Graphics.GameWindow.Size.Y), Position = new Vector2f(0, 0) }; E_Graphics.GameWindow.Draw(tmpSprite); // E_Globals.DrawThunder--; tmpSprite.Dispose(); } }