private void SetAppearance(MicrowaveVisualState state) { if (_appearance != null || Owner.TryGetComponent(out _appearance)) { _appearance.SetData(PowerDeviceVisuals.VisualState, state); } }
private void SetAppearance(MicrowaveVisualState state) { var finalState = state; if (_broken) { finalState = MicrowaveVisualState.Broken; } if (_entities.TryGetComponent(Owner, out AppearanceComponent? appearance)) { appearance.SetData(PowerDeviceVisuals.VisualState, finalState); } }