> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ILampArray::SetIsEnabled 方法

> 啟用或停用目前處理程序對 LampArray 周邊裝置的照明控制，讓遊戲可以暫停及繼續其 RGB 效果。

# ILampArray::SetIsEnabled

設定 ILampArray 對於目前處理程序的啟用狀態。

## 語法

```cpp theme={null}
void SetIsEnabled(
    bool isEnabled)
```

### 參數

*isEnabled*\
類型：bool

ILampArray 所需的啟用狀態。

### 傳回值

類型：void

## 備註

停用時，仍可在內部設定 Lamp 的狀態，但不會傳送至裝置。重新設定為啟用時，修改過的 Lamp 狀態會排清至裝置。

根據預設，ILampArray 一律為啟用狀態。

## 需求

**標頭：** LampArray.h

**程式庫：** xgameplatform.lib

**支援的平台：** XBOX One 系列主機和 XBOX Series 主機

## 另請參閱

[照明 API 概觀](/zh-TW/build/core-features/common/lighting/gc-lighting-toc)\
[ILampArray::GetIsEnabled](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getisenabled)\
[ILampArray](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/ilamparray)


## Related topics

- [ILampArray::GetIsEnabled 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_getisenabled.md)
- [ILampArray::SetColor 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolor.md)
- [ILampArray::SetColorsForIndices 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforindices.md)
- [ILampArray::SetColorsForScanCodes 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setcolorsforscancodes.md)
- [ILampArray::SetBrightnessLevel 方法](/zh-TW/reference/lighting/lamparray/interfaces/ilamparray/methods/ilamparray_setbrightnesslevel.md)
