🔒 Closed C# Collision/Bounds/Intersects

Status
Not open for further replies.

Naruhudo

Eternal Poster
First time ko lang po maggame dev sa with C#
Ask lang po pano ko po ba magawang magame over yung laro na nakaintersect/collide talaga sya don sa obstacle at hindi sa bounds/space nito png file po yung obstacle...
parang flappy lang po tong ginawa ko
maraming salamat po sa makasagot
1653496455442.webp


ito yung code ko for intersect
if (
flappyBinangkal.Bounds.IntersectsWith(obstacle1.Bounds) ||
flappyBinangkal.Bounds.IntersectsWith(obstacle2.Bounds) ||
flappyBinangkal.Bounds.IntersectsWith(ground.Bounds) ||
flappyBinangkal.Top < -25
)
{
endGame();
}
}
 
Status
Not open for further replies.

About this Thread

  • 0
    Replies
  • 453
    Views
  • 1
    Participants
Last reply from:
Naruhudo

Online now

Members online
855
Guests online
2,688
Total visitors
3,543

Forum statistics

Threads
2,276,109
Posts
28,967,662
Members
1,231,121
Latest member
hgfnbvcc
Back
Top