Adventure Creator  1.79.1
An adventure game toolkit for Unity, by Chris Burton, ICEBOX Studios 2013-2022
AC.LightSwitch Class Reference
Inheritance diagram for AC.LightSwitch:

Public Member Functions

void TurnOn ()
 
void TurnOff ()
 

Public Attributes

bool enableOnStart = false
 

Protected Member Functions

void Awake ()
 
void Switch (bool turnOn)
 

Protected Attributes

Light _light
 

Detailed Description

This script provides functions to enable and disable the Light component on the GameObject it is attached to. These functions can be called either through script, or with the "Object: Send message" Action.

Member Function Documentation

◆ TurnOff()

void AC.LightSwitch.TurnOff ( )

Disables the Light component on the GameObject this script is attached to.

◆ TurnOn()

void AC.LightSwitch.TurnOn ( )

Enables the Light component on the GameObject this script is attached to.

Member Data Documentation

◆ enableOnStart

bool AC.LightSwitch.enableOnStart = false

If True, then the Light component will be enabled when the game begins.