P
P
password222021-04-02 23:48:31
Unity
password22, 2021-04-02 23:48:31

How to launch an action only on a combination of clicks on certain objects?

Good afternoon! I don’t understand how to do it, like, for example, in all sorts of strategies, when you click on a car, it stands out, then you click on a building - it goes there. And if you click on an empty space, the choice will drop from it.

I assume that somehow manually in the code you need to paint all these combinations?

Here's what I came up with:

script <b>InteractiveObject</b> //родитель всем, на кого можно нажать и выделить

script Car : InteractiveObject //эти "дети" переопределяют метод, который вызывается по клику на
script House : InteractiveObject // интерактивный объект и дальше...?


further I did not understand how. How can I make sure that something specific is clicked next? I sit and think, to find and come up with something similar until it turns out.

I will be glad for any help! Thanks

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question