For i As Integer = 0 To objects.Count - 1
objects(i).DrawLocation = New Point(objects(i).DrawLocation.X, objects(i).DrawLocation.Y - 16)
If New Rectangle(objects(i).DrawLocation.X, objects(i).DrawLocation.Y, 32, 32).IntersectsWith(New Rectangle(playerRect.X, playerRect.Y + 64, 32, 0)) Then
If Not objects(i).Transparent = True And Not objects(i).Btype = "air" Then
graph.DrawRectangle(Pens.Black, playerRect)
graph.FillRectangle(Brushes.Chartreuse, playerRect)
fall = False
Debug.WriteLine("collision")
Else
graph.DrawRectangle(Pens.Black, playerRect)
graph.FillRectangle(Brushes.Chartreuse, playerRect)
fall = True
End If
If fall = True Then
Else
REM Deutsch
' Deutsch
For ni = 0 To i
objects(i).DrawLocation = New Point(objects(i).DrawLocation.X, objects(i).DrawLocation.Y + 16)
Next
Exit For
End If
End If
Next
Hey guys
I've been hard at work recently on a certain kind of graivity for my game. I got the actual player to move, but now I am trying to instead get the blocks to move. This is proving to be a bit of an issue. What I really want is, as soon as the player hits a non-transparent block or air the blocks will stop moving and it will arrange itself properly. What happens is this...

It is not working the way it's supposed to. I've done what I can but nothing works so I have decided to come to you. I'll keep working on it in the meantime but I hope someone can help me out.
Thanks

New Topic/Question
Reply



MultiQuote



|