It is currently Thu Oct 22, 2020 8:05 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [2D Game]how I get the sprite ID inside a screen ?
PostPosted: Tue Jan 21, 2020 7:36 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Dec 04, 2015 9:26 pm
Posts: 291
how I get the sprite identifier inside a screen which the mouse clicked on , or collision between sprites ?


Top
 Profile  
Reply with quote  
 Post subject: Re: [2D Game]how I get the sprite ID inside a screen ?
PostPosted: Tue Jan 21, 2020 1:57 pm 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Sat Jul 23, 2011 1:13 am
Posts: 304
Location: Germany
SpriteCollision()
SpritePixelCollision()

For the mouse, display an invisible Sprite at the cursor and use SpriteCollision().

You need to loop through all the sprites and check for collisions. More than two sprites can have a collision if they overlap.


Top
 Profile  
Reply with quote  
 Post subject: Re: [2D Game]how I get the sprite ID inside a screen ?
PostPosted: Wed Jan 29, 2020 5:21 am 
Offline
Enthusiast
Enthusiast
User avatar

Joined: Fri Dec 04, 2015 9:26 pm
Posts: 291
thanks :D


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 8 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye