Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- on : boolean = false;
- function Update()
- {
- if(Input.GetKeyDown(KeyCode.F))
- on = !on;
- if(on)
- light.enabled = true;
- if(!on)
- light.enabled = false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement