コード例 #1
0
 private void SetAppearance(MicrowaveVisualState state)
 {
     if (_appearance != null || Owner.TryGetComponent(out _appearance))
     {
         _appearance.SetData(PowerDeviceVisuals.VisualState, state);
     }
 }
コード例 #2
0
        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);
            }
        }