BlackLight.switchLight C# (CSharp) Method

switchLight() public method

public switchLight ( ) : void
return void
	public void switchLight ()
	{
    if (GameStateController.isShortcutKey(GameStateController.keyPrefix+_blackLightOn, true)
                && !isActive
       )
		{
			createBlackLight();
			if(!_shaderChanged)
				setDiffuseTransparentPlane();
			isActive = true;
		}
    if (GameStateController.isShortcutKey(GameStateController.keyPrefix+_blackLightOff, true)
            && isActive
       )
		{
			leaveBlackLight();
			isActive = false;
		}
	}
}