Code cleanup.
This commit is contained in:
@@ -59,11 +59,8 @@ namespace Cryville.Common.Unity.Input {
|
||||
var t = unity::Input.GetTouch(i);
|
||||
Vector2 pos = UnityCameraUtils.ScreenToWorldPoint(t.position);
|
||||
var vec = new InputVector(time, pos);
|
||||
if (t.phase == TouchPhase.Began || t.phase == TouchPhase.Stationary || t.phase == TouchPhase.Moved) {
|
||||
handler.Feed(0, t.fingerId, vec);
|
||||
}
|
||||
else if (t.phase == TouchPhase.Ended || t.phase == TouchPhase.Canceled) {
|
||||
handler.Feed(0, t.fingerId, vec);
|
||||
handler.Feed(0, t.fingerId, vec);
|
||||
if (t.phase == TouchPhase.Ended || t.phase == TouchPhase.Canceled) {
|
||||
handler.Feed(0, t.fingerId, new InputVector(time));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user