Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var on : boolean = false;
- var shine : GameObject;
- function Update()
- {
- if(Input.GetKeyDown(KeyCode.F))
- var audio: AudioSource = GetComponent.<AudioSource>();
- audio.Play();
- on = !on;
- if(on)
- shine.SetActive(true);
- if(!on)
- shine.SetActive(false);
- }
Advertisement
Add Comment
Please, Sign In to add comment