Created
February 20, 2013 08:50
-
-
Save gashtio/4994062 to your computer and use it in GitHub Desktop.
Modified TriggerOnMouseOrJoystick.js Unity3D script that allows toggling its functionality
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
private var allowInput : boolean = true; | |
... | |
function Update () { | |
if (Input.GetKeyDown(KeyCode.Space)) | |
{ | |
allowInput = !allowInput; | |
} | |
if (!allowInput) | |
{ | |
return; | |
} | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment