View Single Post
lightbulb on/off
Old
essjai
Junior Member
 
Status: Offline
Posts: 1
Join Date: Nov 2011
Default lightbulb on/off - 11-16-2011, 09:48 AM

"Create a world with a lightbulb (Lights) and a method turnOnOff that turns the lightbulb on/off depending on whether it is already on/off. When the lightbulb is on, its emissive color property has a value of yellow. When the lightbulb is off, it's emissive color is black. Write a Boolean function isLightOn that returns true if the light bulb is on and false if it is off. When clicked, the lightbulb should turn on/off."

Okay I know this probably sounds like a stupid question because it's such an easy task but I'm completely stuck.

I made a new event for when the mouse clicks the lightbulb.
I also created a new method turnOnOff and I made the Boolean function isLightOn. It works fine.
But I don't know what to do now. Am I supposed to put the function into the method I made, if so how do i do this? If not, what am I supposed to do?
   
Reply With Quote