verschiedene bilder geladen,trotzdem kommen gleiche
Verfasst: 11.01.2005 08:31
ich habe 2 verschiedene bilder geladen,für maus und einfach so ein bild um zu testen wie das funktioniert mit SpriteCollision()
und obwohl ich 2 verschiedene bilder geladen habe,kommt trotzdem nur eins,das ist das gleiche wie bei der maus...hier ist der code
warum ist das so?
und obwohl ich 2 verschiedene bilder geladen habe,kommt trotzdem nur eins,das ist das gleiche wie bei der maus...hier ist der code
Code: Alles auswählen
InitSprite()
;-defi loading
OpenScreen(800,600,16,"Test")
FontID3 = LoadFont(3, "Digital", 10)
StartDrawing(ScreenOutput())
FrontColor(20,255,20)
Locate(300,300)
BackColor(0,0,0)
DrawText("I")
StopDrawing()
FlipBuffers()
InitKeyboard()
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
FrontColor(20,255,20)
Locate(300,300)
BackColor(0,0,0)
DrawText("II")
StopDrawing()
FlipBuffers()
InitMouse()
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
FrontColor(20,255,20)
Locate(300,300)
BackColor(0,0,0)
DrawText("III")
StopDrawing()
FlipBuffers()
LoadSprite(Bild1,"C:\UniMatrix\Welcome.bmp")
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
FrontColor(20,255,20)
Locate(300,300)
BackColor(0,0,0)
DrawText("IIII")
StopDrawing()
FlipBuffers()
LoadSprite(cursor,"C:\Eigene Dateien\Eigene Bilder\ico\CircuitPhantom.ico.bmp")
ClearScreen(0,0,0)
StartDrawing(ScreenOutput())
FrontColor(20,255,20)
Locate(300,300)
BackColor(0,0,0)
DrawText("IIIII")
Locate(300,320)
DrawText("Complete")
Locate(300,340)
DrawText("Auflösung : 1024*768 16 bitmodus")
StopDrawing()
TransparentSpriteColor(cursor,255,0,255)
FlipBuffers()
Delay(1000)
MouseLocate(300,300)
;-Hauptschleife 1
;
Repeat
ClearScreen(0,0,0)
ExamineKeyboard()
ExamineMouse()
DisplaySprite(cursor,MouseX(),MouseY())
DisplaySprite(Bild1,100,100)
If MouseButton(1)
;-überüprüfung ob ein bild gedrückt worden ist was gedrückt wurden ist
If SpriteCollision(Bild1, 100, 100, cursor, MouseX(), MouseY())
StartDrawing(ScreenOutput())
FrontColor(0,128,0)
BackColor(0,0,0)
Locate(300,300)
DrawText("Bild wurde gedrückt")
StopDrawing()
Else
StartDrawing(ScreenOutput())
FrontColor(0,128,0)
BackColor(0,0,0)
Locate(300,300)
DrawText("Bild wurde nicht gedrückt")
StopDrawing()
EndIf
EndIf
FlipBuffers()
Until KeyboardPushed(#PB_Key_Escape)
CloseScreen()
End