Ich zitiere mal aus meinem angefangenen GDI+ Tut
ZitatAlles anzeigen
...
Es gibt kein _GDIPlus_LineGetPos oder sonst irgendeinen Befehl, um koordinaten von
irgendwas auszulesen (man könnte es ja mal mit Pixelsearch probieren - lol :D).
Ihr müsst euch also die koordinaten von ALLEM was sich bewegen soll in eigene Variablen
(Sinnigerweise Arrays) schreiben.Wollt ihr nun ein Objekt bewegen, so rechnet ihr auf die aktuelle Position nur noch die
Geschwindigkeit in die jeweilige Richtung drauf.
Nach links bewegen: X Koordinate verringern
Nach Unten bewegen: Y Koordinate vergrößern
usw.
...
Sprich: Kugel bewegen, Gegner bewegen, Positionen vergleichen.
Wenn die Kugel den Gegner berührt (Wenn die Positionen sich überschneiden), dann hast du getroffen.