C # development Wpf/silverlight animation and games series (Game Course): (17) The slick of the Perfect Elf (WPF only) ①
Develop Wpf/silverlight animation and game tutorials through C # (Game Course): (14) Wizard control turned out! ①, C # development Wpf/silverlight animation and games series Tutorials (Game Course): (15) Wizard control turned out! ② 's study, we have mastered how to create a first embryonic wizard control. I've given it a small amount of properties at the moment, but it's still a long way from being perfect. Therefore, I intend to be in the later chapters of the auxiliary game design as the premise, the wizard control for a full range of packaging to make it more perfect and harmonious (^-^ | | )。
In all the examples in the previous chapters, the role has only one direction and the action is running, so many friends ask me how to achieve the full direction and full action of the role. Although I have already promotions the relevant solution in the article, it may be more difficult to make the first contact with the Wpf/silverlight game maker logically. Then this section will achieve the protagonist 8 direction (in the next article, when involved in the role direction, I will be the clock 0 points in the position of 0, then clockwise direction of 1, 2, 3, 4, 5, 6, 7, popular speaking is the direction of the symbol 0 representative of the role face north, 1 for northeast, 2 for East, 3 for southeast, 4 for South, 5 for southwest , 6 for West, 7 for northwest) the following figure:
5 Basic Action (each action consists of a number of frames, take this tutorial will be used after the protagonist picture as an example, which standing action from 5 pictures of continuous play formation, run 8, attack 7, cast 6, die 8. Of course, in the quality of the game a role is not only these 5 actions, as well as injuries, dizziness, horse dismount and so on, this tutorial to teach you how to use the basic and conventional production for the purpose, on the more delicate work depends on everyone to play and innovation. As for you to ask me whether the frame number of these actions is the most reasonable, I can tell you certainly not (picture for a broken day sword, I retained the original frame configuration is not big changes). If you're going to develop a Silverlight game, I suggest that you try to keep each action frame number not more than 5 frames, the practice proves that this in the Web game can achieve performance and effect of the golden Section; As for a game with a client like WPF, it doesn't matter if you can set all the actions to 10+ frames. In the following tutorial I will show you the 16 frame action in the Swordsman World as follows: