
文件夾[-]
一、效果圖
二、操作步驟
1.官方文檔上的步驟
2.翻譯一下以上的步驟
3.依據官方的這些提示。自己來做一個屬於自己的人物遙感控制
對於移動平台上的RPG類的游戲。我們經常使用虛擬搖桿來控制人物角色的行走和一些行為,相信我們對它並不陌生,之前嘗試了EasyTouch2.5,發現並沒有最新版的3.1好用,2.5版本號的對於自適應沒有做的非常好,而最新版的已經攻克了這一問題。當然unity也自帶了搖桿Joystick,用起來也簡單,但存在不少局限,不會滿足普通mmo游戲的需求,比方指定顯示區域或者是更改一些素材等等,而這些EasyTouch插件都已經幫你實現,不得不佩服插件的原作者。能做出這么炫酷好用的插件,當然這預計是老外開發的,關於插件的下載,你能夠在AssetStore上購買,當然也能夠使用free版。
我這里也提供一個3.1版本號的插件下載地址:http://download.csdn.net/detail/s10141303/6962919
一、效果圖
感覺非常酷有木有!接下來就看一下創建的過程吧! unity3d官
二、操作步驟
1.官方文檔上的步驟
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 Receiver.
9- Run it in editor, and click on the screen