Adding asteroids
As the spaceship flies from left to right (actually it does not, but that's how it seems), you have to add asteroids, which enter the screen from the right-hand side of the game.
Now, you can just place some asteroid sprites on the right-hand side of the screen and make them move to the left-hand side just like you did with the background cityscape, but you wouldn't learn anything new if you did that, so let's see another way to manage sprite movement.
First things first, before you can move an asteroid, you have to create it.
In this game, a new asteroid will appear every half a second, so it's time to schedule another event in the game
class declaration:
var game = cc.Layer.extend({ init:function () { this._super(); cc.eventManager.addListener({ event: cc.EventListener.MOUSE, onMouseDown: function(event){ ship.engineOn = true; }, onMouseUp: function(event){ ship.engineOn = false; } },this) background = new ScrollingBG...