Can anyone help with a small project such as a Keyboard simulator?
I want to write a small project in Unity, but something somehow does not work. Could be described as a typing tutor. On the screen randomly appear 33 sprite( not at once), each sprite has a key on the keyboard, if you find a specific screen sprite has been pressed the desired button( that is, previously assigned) , then replace this sprite to another( with another button). If a player in the allotted time time to press the button, then everything is repeated if the player did not, he loses. At the moment I only have a List( with sprites) and
Dictionary( with buttons) public List sprites = new List();
public Dictionary dict = new Dictionary();
And who can help)
Sign for themselves, on paper, the sequence of actions in the simulator. What, how and in which order happens.
After each item think of the logic - if the sprite "displays", then who is it displays what the script is, how does he do it?
Who treats pressing the keypad? What should happen when clicking? Who, what script needs to handle the consequences? The one that brought to the screen or the pressing the keypad checks. Or separately managing the script should be?
Draw a pattern with the logic of the application blocks with arrows that it Susano. It will be easier to understand what needs to be done.
Well, then it will go easier. Break one task into several small.
For example, the task "script draws a sprite":
- how draws? (ready to copy or creates a new element, or changes and existing one)
- some of the sprites?
- where features on the screen?
Not having a clear idea of what will be the output and how to work, not work and to submit a scope of work, and therefore detailing tasks.
You can continue to ask questions, how to make a particular node in your project, but I think we must first solve how the desired nodes after you will meet and interact.
You can search and get a couple of the smaller tutorials on creating projects in unity, in order from the beginning to the end it was clear the process of creating the app and the overall structure and interaction of elements.
Jeff28 answered on June 14th 19 at 19:01
Store the status in a normal array for each object on the screen (a sprite).
And work with data array, and not with the screen.
Lavinia17 answered on June 14th 19 at 19:03
- create a sprite
- create a script to fill up on your sprite
- in Start() ask a random KeyCode (0-32) and the desired sprite
in Update catch sequence right keys Down -> Up + say Y to reduce the sprite fell + check Y coordinates on the outside of the screen
- change again to a random KeyCode+sprite if the player had to press