mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 17:43:05 +08:00
Mark the shader as non-nullable because shader should always has the value.
And initialize the breaks to avoid get the null instance.
This commit is contained in:
parent
3af093cb27
commit
317558f876
@ -94,13 +94,13 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
public readonly BindableInt Combo = new BindableInt();
|
public readonly BindableInt Combo = new BindableInt();
|
||||||
|
|
||||||
private IShader shader;
|
private IShader shader = null!;
|
||||||
|
|
||||||
protected override DrawNode CreateDrawNode() => new FlashlightDrawNode(this);
|
protected override DrawNode CreateDrawNode() => new FlashlightDrawNode(this);
|
||||||
|
|
||||||
public override bool RemoveCompletedTransforms => false;
|
public override bool RemoveCompletedTransforms => false;
|
||||||
|
|
||||||
public List<BreakPeriod> Breaks;
|
public List<BreakPeriod> Breaks = new List<BreakPeriod>();
|
||||||
|
|
||||||
private readonly float defaultFlashlightSize;
|
private readonly float defaultFlashlightSize;
|
||||||
private readonly float sizeMultiplier;
|
private readonly float sizeMultiplier;
|
||||||
@ -205,7 +205,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
{
|
{
|
||||||
protected new Flashlight Source => (Flashlight)base.Source;
|
protected new Flashlight Source => (Flashlight)base.Source;
|
||||||
|
|
||||||
private IShader shader;
|
private IShader shader = null!;
|
||||||
private Quad screenSpaceDrawQuad;
|
private Quad screenSpaceDrawQuad;
|
||||||
private Vector2 flashlightPosition;
|
private Vector2 flashlightPosition;
|
||||||
private Vector2 flashlightSize;
|
private Vector2 flashlightSize;
|
||||||
@ -253,7 +253,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
protected override void Dispose(bool isDisposing)
|
protected override void Dispose(bool isDisposing)
|
||||||
{
|
{
|
||||||
base.Dispose(isDisposing);
|
base.Dispose(isDisposing);
|
||||||
quadBatch?.Dispose();
|
quadBatch.Dispose();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user