smol tweak to reenable behavior

Reenabling autodetection should reset the timer so you don't immediatly transition into a new state.
This commit is contained in:
NotAKidoS 2022-10-14 03:14:42 -05:00
parent dcc4320ffa
commit 329b3bcbdf

View file

@ -151,6 +151,12 @@ public class BlackoutController : MonoBehaviour
}
}
void OnEnable()
{
curTime = Time.time;
lastAwakeTime = curTime;
}
void OnDisable()
{
ChangeBlackoutState(BlackoutState.Awake);