You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
853 B
35 lines
853 B
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
public class tuio_event : MonoBehaviour
|
|
{
|
|
// Start is called before the first frame update
|
|
public GameObject img;
|
|
public UltraCombos.GlobalMKHookInput tuio_input;
|
|
public UltraCombos.ActivityPool act_pool;
|
|
public UltraCombos.Activity act_in;
|
|
public UltraCombos.Activity act_out;
|
|
|
|
void Start()
|
|
{
|
|
|
|
}
|
|
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
int c = tuio_input.touchCount;
|
|
Debug.Log(c);
|
|
if(c > 0)
|
|
{
|
|
act_pool.SwitchTo(act_in);
|
|
Vector2 pos = tuio_input.GetTouch(0).position;
|
|
img.GetComponent<RectTransform>().position = new Vector3(pos.x, pos.y, 0);
|
|
} else
|
|
{
|
|
act_pool.SwitchTo(act_out);
|
|
}
|
|
|
|
}
|
|
}
|
|
|