D
D
Diana Stoyka2021-09-08 14:51:37
C++ / C#
Diana Stoyka, 2021-09-08 14:51:37

How to implement when a ball with a certain letter appears by pressing this letter on the keyboard, the ball bursts?

(On PC) Balls with a letter appear on the screen and the player must find these letters on the keyboard and press, then the ball will burst and the player will receive a ball. The question is how or in what direction should I do this (a ball appears, the player starts on the letter on the keyboard that is on it and it bursts). I don't know how to do this, can you advise?
Thanks in advance for your reply.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Mayorov, 2021-09-08
@Dianka05

I would do this: I would create a script in which I would indicate 1 property - a symbol, which will then be displayed on the object. And I would do the processing of the button in the Update method, where I would check the condition, whether the character from the keyboard matches the character of the object. And when the button was pressed, and if everything matched, the ball would "burst", and the player would be credited with one point in a static variable.
This is the simplest explanation of how I would do it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question