🔒 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
  • 466
    Views
  • 1
    Participants
Last reply from:
Naruhudo

Trending Topics

Online now

Members online
1,203
Guests online
3,815
Total visitors
5,018

Forum statistics

Threads
2,308,726
Posts
29,186,912
Members
1,191,181
Latest member
xxshadowxx
Back
Top