Unity3d plugin] simple usage of EasyTouch
EasyTouch
Directory [-]
I,
Ii. Procedure
1. Steps in the official documentation
2. Translate the above steps
3. Make Remote Sensing Control for your own characters according to the official prompts.
For RPG games on mobile platforms, we often use virtual joystick to control the walk and behavior of character roles. I believe we are no stranger to it. We tried EasyTouch2.5 before, it is found that the latest version of 3.1 is not easy to use. The version 2.5 does not do well in self-adaptation, and the latest version has solved this problem. Of course, unity also comes with the Joystick, which is easy to use, but there are many limitations that won't meet the needs of General mmo games, such as specifying display areas or changing some materials, these EasyTouch plug-ins have been implemented for you, and you have to admire the plug-in's original author to make such cool and useful plug-ins. Of course, this is estimated to be developed by foreigners. For the download of plug-ins, you can purchase it on AssetStore, or use the free version.
I also provide a 3.1 unity3d plugin here: http://download.csdn.net/detail/s10141303/6962919
I,
It feels cool! Next, let's take a look at the creation process!
Ii. Procedure
1. Steps in the official documentation
Quick Start (C #)
1-Import EasyTouch Package.
2-Create an empty gameObject, and name it EasyTouch. (You can choose another name)
Step 1 & 2 can be replace by the option menu
3-Add the EasyTouch. cs script on the EasyTouch gameObject that you just created.
4-Select the EasyTouch gameobject, and verifies that Broadcast messages is set to FALSE in the inspector.
5-Create a new C # script MyFirstTouch
6-Add these methods
[Csharp] view plaincopyprint?
// Subscribe to events
Void OnEnable (){
EasyTouch. On_TouchStart + = On_TouchStart;
}
// Unsubscribe
Void OnDisable (){
EasyTouch. On_TouchStart-= On_TouchStart;
}
// Unsubscribe
Void OnDestroy (){
EasyTouch. On_TouchStart-= On_TouchStart;
}
// Touch start event
Public void On_TouchStart (Gesture gesture ){
Debug. Log ("Touch in" + gesture. position );
}
7-Create an empty gameObject, and name it Receiver.
8-Add MyFirstTouch script to the gameObject er.
9-Run it in editor, and click on the screen