K
K
Kirill912 20072019-09-06 23:35:31
C++ / C#
Kirill912 2007, 2019-09-06 23:35:31

If an object touches a certain color, then perform a certain action?

Hello!
I decided to make a program in c# (in visual studio).
I am using windows forms.
I just can’t find how to make it so that if some object touches an object that has a black color, perform a certain action?
Thanks in advance)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Griboks, 2019-09-07
@Griboks

if (obj.intersects(other) && other.color == Color.black){
...
}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question