public void CmdToggleLightSwitch(GameObject switchObj) { Lighting.LightSwitchTrigger s = switchObj.GetComponent <Lighting.LightSwitchTrigger>(); if (s.isOn) { s.isOn = false; } else { s.isOn = true; } }
public void CmdToggleLightSwitch(GameObject switchObj) { Lighting.LightSwitchTrigger s = switchObj.GetComponent <Lighting.LightSwitchTrigger>(); s.isOn = !s.isOn; }