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

Trending Topics

Online now

Members online
1,094
Guests online
1,754
Total visitors
2,848

Forum statistics

Threads
2,286,534
Posts
29,038,466
Members
1,217,040
Latest member
DevilOil
Back
Top