Friday, November 12, 2010

2 Player implemented



Okay, I didn't realize until last class that we were supposed to implement 2 player mode, so I worked on a solution to it. I ended up going with a new object "SpaceInvadersLevel" which held the ship, the enemies, the barriers and all of that. As well as the level the player was on, how many lives, and the score.

If they choose a 1 player game I just instantiate one of these objects, if they choose 2 player I instantiate 2 of them and switch back and forth between them when the player loses a life or goes to the next level (I think that's how it's supposed to work).

Had all sorts of weird bugs with my Laser singleton, but finally figured it out.

A few more things to go and I'll be all done.

No comments:

Post a Comment