void MoveTouchBall(Touch t) { int index = t.fingerId; TouchBall b = touchBalls[index]; b.phase = t.phase; b.gameObject.transform.position = FindTouchPoint(t); }
void OnPressed(TouchBall b) { if (touch == -1) { touch = b.fingerId; animator.Play("hold"); } //Debug.Log(touch); }
void RemoveTouchBall(Touch t) { int index = t.fingerId; TouchBall b = touchBalls[index]; b.phase = t.phase; touchBalls.Remove(index); Destroy(b.gameObject, 0.1f); }
void OnReleased(TouchBall b) { if (touch == b.fingerId) { animator.Play("idle"); damage = 0f; touch = -1; } //Debug.Log(touch); //Debug.Log(b.fingerId); }
void NewTouchBall(Touch t) { int index = t.fingerId; TouchBall b = Instantiate(sampleTouchBall, FindTouchPoint(t), Quaternion.identity).GetComponent <TouchBall>(); b.Size = touchSize; b.phase = t.phase; b.fingerId = index; touchBalls[index] = b; }