The *error* was sooooooooooooooo stupid that
I don't understand how I couldn't have seen that.
I tried to implement my timer module (a simple countdowntimer) in the scripting language Lua.
To test if the implementation works correct,I wrote a little testapplication in Lua which just creates a new image and draws it on the screen for a specific amount of time.My problem was although the timer had stopped the image was still visible...I tried nearly everything to make it work but I failed over and over again.
Yesterday I realized that I forgot to draw a background in the testapplication.
The test-image (a tiny little ship by the way) was still visible because there was nothing that drew over it. Sooooo stupid -.-
If someone cares, here's the script:
function Start()
testsurface = Surface.New("Ship.bmp")
testtimer = Timer.New(3000) --3000 is the time
--in milliseconds the timer's running
end
function Update()
if Timer.IsRunning(testtimer) == true then
Graphics.Render(testsurface)
end
end
No comments:
Post a Comment