At line 18 you're setting the timeStamp to be 2 seconds in the future, and at line 25 you're making the if statement not get triggered until those 2 seconds pass.
From what I see, after you click, your ship would stop having its position transformed, and then start again after 2 seconds.
What is the timeStamp meant to be doing, by the way?
↧