Tag Info

New answers tagged

0

To prevent the check of the object colliding against itself, just check the reference like so: Core.objectCollision = function() { if (Core.Mouse.isHolding != null) { for (i in Core.Objects) { // Skip the object that was grabbed. if (i == Core.Mouse.isHolding) continue; if ...


0

I wasen't able to get the array working so I bypassed it and got it working by adding contextVar.strokeRect(filledCircle.x,filledCircle.y,filledCircle.w,filledCircle.h); to the addFilledCircleFunc. // to do: // add gameloop and draw with gameloop? // stroke line in resize fix // collission check + detection objects // functions to draw detection objects // ...


0

Using these variables float elapsedTime float totalFlightTime float incrementTime int numTiles ElapsedTime is the current position in time and should be advanced with delta time every frame. TotalFlightTime is the total amount of time the flight should take. NumTiles is the total number of tiles needed to advanced to the next city. Now set ...


2

If you mean that they are in several .html files you can simply call window.location = "level2.html" when the player ends the first level. Also: You should consider that if you are playing the game from a browser (not on a packaged app), many server requests will happen between the levels so it won't be an optimal user experience. If you are still ...



Top 50 recent answers are included