Welcome,
Guest
. Please
login
or
register
. Did you miss your
activation email?
French forum
Home
Help
Search
Login
Register
SFML community forums
»
Help
»
Graphics
»
Test if any object is on a location
Print
Pages: [
1
]
Author
Topic: Test if any object is on a location (Read 2245 times)
0 Members and 1 Guest are viewing this topic.
kim366
Newbie
Posts: 35
Test if any object is on a location
«
on:
December 03, 2013, 04:28:12 pm »
Hello!
I have 2 Integers. one for x Location and one for y. And i want a boolean to be true whenever any object is on those coordinates.
Sorry for my bad english
Logged
zsbzsb
Hero Member
Posts: 1409
Active Maintainer of CSFML/SFML.NET
Re: Test if any object is on a location
«
Reply #1 on:
December 03, 2013, 04:49:36 pm »
if (location.x == object.x && location.y == object.y)
{
// Profit???
}
Logged
Motion / MotionNET
- Complete video / audio playback for SFML / SFML.NET
NetEXT
- An SFML.NET Extension Library based on
Thor
kim366
Newbie
Posts: 35
Re: Test if any object is on a location
«
Reply #2 on:
December 05, 2013, 05:30:15 pm »
I dont just want to check if one object is there, but if any object is there.
Logged
wintertime
Sr. Member
Posts: 255
Re: Test if any object is on a location
«
Reply #3 on:
December 05, 2013, 05:42:04 pm »
Then just add a loop?
Logged
Print
Pages: [
1
]
SFML community forums
»
Help
»
Graphics
»
Test if any object is on a location
anything