mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 06:36:31 +09:00
Dispose instead
This commit is contained in:
@ -155,13 +155,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
private Vector2 flashlightSize;
|
||||
private float flashlightDim;
|
||||
|
||||
private readonly VertexBatch<PositionAndColourVertex> quadBatch = new QuadBatch<PositionAndColourVertex>(1, 1);
|
||||
private readonly Action<TexturedVertex2D> addAction;
|
||||
|
||||
public FlashlightDrawNode(Flashlight source)
|
||||
: base(source)
|
||||
{
|
||||
var quadBatch = new QuadBatch<PositionAndColourVertex>(1, 1);
|
||||
|
||||
addAction = v => quadBatch.Add(new PositionAndColourVertex
|
||||
{
|
||||
Position = v.Position,
|
||||
@ -194,6 +193,12 @@ namespace osu.Game.Rulesets.Mods
|
||||
|
||||
shader.Unbind();
|
||||
}
|
||||
|
||||
protected override void Dispose(bool isDisposing)
|
||||
{
|
||||
base.Dispose(isDisposing);
|
||||
quadBatch?.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user