Question by
justinnemo · Jan 18, 2016 at 08:56 AM ·
javascriptgetcomponent
flashlight on and off
function Update() {
if (Input.GetKeyDown("f")) {
if (light.enabled == true)
light.enabled = false;
else
light.enabled = true;
}
}
this is my code and it said my codes are obsolete
Comment
please format ALL of your code.
if there are errors messages, include them too - in full.