Yeah, I am using the awesome tutorial from http://create.msdn.com/gamedevelopment , and what a lazy blogger I am. But like following a trail in the forest, sometimes the goal is similar, but maybe where I make my camp isn’t going to be the same as the people whose trail I am following, or I stop and fish at a stream, or etc.
The diversion is yet to come, but it will. I am reviewing the third part, Player input which doesn’t have a video.
After working through this part of the tutorial, I simplified my code by eliminating all of the XBox and Windows code, by changing the code to:
That wasn’t hard, I simply comment out the code that I thought was for the XBox and Windows, and then when the code ran, I deleted the code so that the overall code was shorter and to the point.
I also changed the “player” asset which is the aircraft to a dolphin that is manning an anti-aircraft gun. Here is a visual step by step:
Start by finding the player.png in the solution explorer, you can open the Properties box by pressing F4, I added the comments around the player.Initialize line:
Now add an existing png instead of the ship, in this case, a dolphin with a gun to blast water bottles that are entering the water from the land:
Browse to the image, in this case I select the dolphinAA.png
Note that the dolphinAA.png now has the default name of dolphinAA
Now we want to use the DolphinAA.png in place of the Player.png, so first change the Player.png asset name to player1, each asset must be uniquely named:
Change the default asset name for dolphinAA.png from dolphinAA to player
Once you get everything done, you should now see the following (the image will be the one you use), the image should move with your mouse if you are using a computer and with your finger if you load it to the phone.