Question: Please help me with this coding. I have some of it done but not all of it since I'm having trouble with it. https://drive.google.com/open?id=1wMdY6c0jFfFuACyvqNRhENhqU0zHW2qn (link
Please help me with this coding. I have some of it done but not all of it since I'm having trouble with it.
https://drive.google.com/open?id=1wMdY6c0jFfFuACyvqNRhENhqU0zHW2qn (link for better access)
This assignment is all about 2-D drawing in XNA, and you will work mostly with textures. We are interested in developing a framework for sprite animation. It is perhaps a good idea to extend the Sprite class and add the additional functionalities. You will need variables such as speed, number of frames, the current frame, etc. Also, create a framework for displaying a progress bar. We could use this to display health, time remaining, etc. Be flexible allow the user to assign both a background and a foreground sprite/texture, the value to be displayed. If possible, also add a variable for speed, so it can work automatically. In the game, the character (animated sprite) is positioned somewhere in the screen. Pressing the right or left key rotates the sprite appropriately. It animates and moves in the direction it is facing when the up key is pressed. The character has to walk a certain amount before time runs out, and you can earn time by getting close to time bombs.
Core Tasks 80 1 Animated Sprite (a) Create a class to manage an animated sprite (AnimatedSprite) it is perhaps a good idea to extend the Sprite class. Add the additional properties as necessary (10) (b) Have an Update method (or override) where the animation is continued using the time elapsed (10) (c) Depending on which frame it is, you will draw the appropriate portion of the texture. You may need to redefine the source rectangle each time the frame changes (10)
2 Progress Bar (a) Create a class to manage a progress bar (ProgressBar). Once again, it is easiest to extend the Sprite class. Add the additional properties (10) (b) Modify (override) the draw method the common technique is to draw the background, and then the foreground exactly on top of it (15) 25 3 Game (a) Use an AnimatedSprite object as the character and add movement (10) (b) Use a Sprite as the bonus. If the player is close enough to it, the player earns time and the bonus jumps to a random location (10) (c) Have two ProgressBar objects one for the time remaining and other for distance walked. They should update properly (5) 25
Selection Tasks 10 1 Multiple Animations (a) Modify the AnimatedSprite (or create another class) that can handle multiple animations (5) (b) Depending on how you are moving (right, left, up, or down) the appropriate animation is shown (5) 10 2 Analog-like Input (a) Write a class to support functionality for Unity style axes (with positive and negative keys) - a positive key press makes the value go up, while a negative key press takes the value down. In any case, the value tends towards zero (8) (b) Use it in the game for two axes (horizontal and vertical) (2) 10 * 3 Mouse Based Movement (a) Instead of controlling the player using the keyboard, a mouse click isused. The player moves to the position indicated by the click and then stops there (5) (b) The player can rotate only so much and only when it is moving (in other words, if we click behind the player, it won't immediately flip back) (5) *= Challenging Topics
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
