Closed GoogleCodeExporter closed 9 years ago
只对Joystick_Predator.cs进行改动
1.将Awake,Start,Update三处的JoyButtonBound计算代码注释
2.加入新的计算函数
public static Rect GetSquareOnGUICoordinate(Vector2 position, float edgeLength)
{
return new Rect(position.x - edgeLength / 2, Screen.height - position.y - edgeLength / 2, edgeLength, edgeLength);
}
3.重写onTouchBegin,增加一行计算JoyButtonBound代码
4.重写CheckTouch,当hasFingerOnJoyButton==false的时候返回true,否则执��
�base.CheckTouch(t);
5.改动OnGUI代码:原来的代码需要满足hasFingerOnJoyButton条件才执�
��
PS:改动后的代码文件稍后传到GDRIVE
Original comment by lightnin...@gmail.com
on 15 Dec 2012 at 6:01
Original issue reported on code.google.com by
yinyuanq...@gmail.com
on 15 Dec 2012 at 12:13