Skip to content

m-doniec/Unity-Moving-Circle-Simulate-Keypress

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

Unity-Moving-Circle-Simulate-Keypress

How does it work?

InputCtrl.SimKeyPressBool() is an alternative to Unity's Input.GetKey().

GUIButton gets the correct KeyCode by parsing its text component. Then on the button press this KeyCode is added to the declared HashSet ForcedKeys. The InputCtrl.SimKeyPressBool checks if ForcedKeys contains the KeyCode and returns bool accordingly.

Why HashSet?

It provides O(1) search, insertion and deletion.

About

gui buttons simulating keyboard press

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages