1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-28 02:43:19 +08:00

Use private for internally used property

This commit is contained in:
Dean Herbert 2021-09-16 16:54:22 +09:00
parent 2df4073946
commit 9127a706ac

View File

@ -26,12 +26,13 @@ namespace osu.Game.Graphics
/// </summary> /// </summary>
public readonly BindableBool Active = new BindableBool(); public readonly BindableBool Active = new BindableBool();
public bool HasActiveParticles => Active.Value || (lastParticleAdded + maxLifetime) > Time.Current; public override bool IsPresent => base.IsPresent && hasActiveParticles;
public override bool IsPresent => base.IsPresent && HasActiveParticles;
protected virtual bool CanSpawnParticles => true; protected virtual bool CanSpawnParticles => true;
protected virtual float ParticleGravity => 0; protected virtual float ParticleGravity => 0;
private bool hasActiveParticles => Active.Value || (lastParticleAdded + maxLifetime) > Time.Current;
protected ParticleSpewer(Texture texture, int perSecond, double maxLifetime) protected ParticleSpewer(Texture texture, int perSecond, double maxLifetime)
{ {
Texture = texture; Texture = texture;