public void ResetToZero(bool immediately = false) { _turns = 0; PercentComplete = 0; _actualGearAxis.localRotation = Quaternion.Euler(0, 180, PercentComplete * 180); _state = State.Idle; _poweredLight.SetLit(false, immediately); }
public void RegisterPoweredLight(PoweredLight light) { _poweredLights.Add(light); if (light.IsEmergencyLight) { light.SetLit(!HasPower, immediately: true); } else { light.SetLit(HasPower, immediately: true); } }
public void SetFuseState(FuseState newState, bool immediately = false) { State = newState; _badFuse.SetActive(newState == FuseState.Bad); _goodFuse.SetActive(newState == FuseState.Good); _poweredLight.SetLit((newState == FuseState.Good), immediately); if (newState == FuseState.Good) { _door.Close(immediately); } else if (newState == FuseState.Empty) { if (immediately == false) { _fuseRemove.Play(); } } }