I want to quickly put the previously written library, a brain to everyone, but also feel that, such as MSDN documents, and can not be accepted by beginners.
Because most people are unfamiliar with the API, they are reluctant to study and combine them.
So today I choose another way to introduce you to the API, I hope you can learn the skills.
Today I will make a paper man system for everyone. The so-called paper people, we must not be unfamiliar, the most classic is---the Three Kingdoms of the heroes
It is hard to see that he is 2d, hundreds of people in melee scenes, at that time under the low-end computer, not inferior. Now
Mobile phone configuration, like the past low-end computer, his processing speed will never catch up with the mainstream computer nowadays. To achieve a hundreds of-man melee scene,
We can do it in a halfway way.
First look at the final effect (gif a bit big, patience wait for the picture to come out)
If you are interested in paper people, the following text begins:
1. Design Steps
Create one more camera to render 3d scenes
Scene, create an empty object that is used to load 2d pieces of paper.
Create Scrollbar definition blood bar in Ugui
2. Code Binding
Blood bar code binding class Haemalstrand
Public camera camera;//3d Cameras public Transform target;//3d moving objects
Empty object binding class Disk
Public Transform image;//2d elf public camera camera;//3d camera
2d Character Binding Animationsprite
Note that the address is under resources.
Note: Each class is independent, does not inherit anything outside Monobehaviour, through these classes, we expand the idea, to create more usage.
Gameunity 2.0 Documentation (II) Paper man system