c#: public event EventHandler
vb: Public Event SpriteCollision As EventHandler(Of SpriteCollisionEventArgs)
c#: //Handle collision detection with itself
if (se.DetectCollisionSelf && SpriteCollision != null)
se.PerformSelfCollisionDetection();
vb: 'Handle collision detection with itself
If se.DetectCollisionSelf AndAlso SpriteCollision IsNot Nothing Then
se.PerformSelfCollisionDetection()
End If
The problem lies in the "if" statement on the event, which doesn't work in vb.net, saying "Public Event SpriteCollision is an event and cannot be called directly. Use a RaiseEvent statement to raise an event."
I am assuming I would call the raiseevent method and then run the if code in there, but then I am confused as to what I am running it on, since the event in c# is called directly with no arguments..
Any help would be appreciated...
Matt
PJ MartinsPosted Jun 24, 2010, 4:18 PM
If se.DetectCollisionSelf Then
se.PerformSelfCollisionDetection()
End If
Metin ErmanPosted Jun 18, 2010, 9:26 PM
PJ MartinsPosted Jun 18, 2010, 11:20 AM