# WorkLight

### VARIABLES

* <mark style="color:purple;">initiallyTurnedOn</mark>: If true, the lights will turn on, on starting the game
* <mark style="color:purple;">lights</mark>: Reference to all lights of the WorkLight. These well be turned on and off upon interacting
* <mark style="color:purple;">switchSFX</mark>: SFX To play when interacting with WorkLight

***

### Functions | WorkLight.cs

> <mark style="color:green;">SwitchLights()</mark>
>
> Toggles WorkLight state to turn it on or off accordingly.

> <mark style="color:green;">ShowToast(bool forceState, bool playAudio)</mark>
>
> Turns lights on or off, but forces the state to be applied instead of relying on toggling it.
>
> * <mark style="color:purple;">forceState</mark>: Turns the WorkLight on or off.
> * <mark style="color:purple;">playAudio</mark>: If true, switchSFX will be played.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://cowsinss-organization.gitbook.io/save-and-load-add-on/content/04.-shared-content-for-add-ons/worklight.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
