Easytoch使用方法
1.导入插件包
2.
void
LateUpdate(){
float
EasyTochX =
ETCInput
.GetAxis(
"Vertical"
);
float
EasyTochY =
ETCInput
.GetAxis(
"Horizontal"
);
if
(EasyTochX == 0)
//上下轴没动
{
}
if
(EasyTochX > 0)
//向上
{
}
else
//没有向上
{
}
if
(EasyTochX < 0)
//向下
{
}
else
//没有向下
{
}
if
(EasyTochY == 0)
//左右轴没动
{
}
if
(EasyTochY > 0)
//向右
{
}
else
//没有右
{
}
if
(EasyTochY < 0)
//向左
{
}
else
//没向左
{
isLeftMove =
false
;
}
Debug
.LogError(
"EasyTochX= "
+ EasyTochX +
" ,EasyTochY= "
+ EasyTochY);
}