mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Use activated
This commit is contained in:
parent
f3a1e38f40
commit
c2f3b0d8f7
@ -90,7 +90,7 @@ namespace NewHorizons.Components
|
||||
|
||||
if (_stellarRemnant != null)
|
||||
{
|
||||
if (_stellarRemnant.IsActiveAndEnabled())
|
||||
if (_stellarRemnant.IsActivated())
|
||||
{
|
||||
_realObjectDiameter = _stellarRemnant._realObjectDiameter;
|
||||
if (!_stellarRemnant.IsRenderingOn()) ToggleRendering(_outOfRange);
|
||||
@ -110,7 +110,7 @@ namespace NewHorizons.Components
|
||||
if (_stellarRemnant != null)
|
||||
{
|
||||
_stellarRemnant.ToggleRendering(on);
|
||||
on = on && !_stellarRemnant.IsActiveAndEnabled();
|
||||
on = on && !_stellarRemnant.IsActivated();
|
||||
}
|
||||
|
||||
base.ToggleRendering(on);
|
||||
|
||||
@ -11,6 +11,8 @@ namespace NewHorizons.Components
|
||||
{
|
||||
private StellarRemnantType _type = StellarRemnantType.Default;
|
||||
|
||||
private bool _activated;
|
||||
|
||||
private StarEvolutionController _starEvolutionController;
|
||||
|
||||
private StellarRemnantProxy _proxy;
|
||||
@ -68,6 +70,10 @@ namespace NewHorizons.Components
|
||||
}
|
||||
|
||||
if (_starController != null) StarLightController.AddStar(_starController);
|
||||
|
||||
_activated = true;
|
||||
}
|
||||
|
||||
public bool IsActivated() => _activated;
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ namespace NewHorizons.Components
|
||||
|
||||
public void ToggleRendering(bool on)
|
||||
{
|
||||
on = on && IsActiveAndEnabled();
|
||||
on = on && IsActivated();
|
||||
|
||||
_renderingOn = on;
|
||||
|
||||
@ -146,7 +146,7 @@ namespace NewHorizons.Components
|
||||
controller.SetProxy(this);
|
||||
}
|
||||
|
||||
public bool IsActiveAndEnabled() => _stellarRemnantController.isActiveAndEnabled;
|
||||
public bool IsActivated() => _stellarRemnantController.IsActivated();
|
||||
public bool IsRenderingOn() => _renderingOn;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user