Exemple #1
0
    public void UpdatePipeDragView(PointerEventData eventData, Vector3 startPos)
    {
        Vector3          position = Camera.main.ScreenToWorldPoint(eventData.position);
        int              id       = eventData.pointerId;
        GamePipeDragView dragView = GetPipeDrag(id);

        dragView.UpdatePipeDrag(startPos, position);
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     GamePipeDragViews = new ArrayList(maxTouchCount);
     for (int i = 0; i < maxTouchCount; i++)
     {
         GamePipeDragView pipeDragView = GamePipeDragView.CreatePipeDrag(pipeDragPrefab, pipeDragParent);
         GamePipeDragViews.Add(pipeDragView);
     }
 }
Exemple #3
0
    public static GamePipeDragView CreatePipeDrag(GameObject pipeDragPrefab, GameObject parent)
    {
        GameObject newPipeDragObject = Instantiate(pipeDragPrefab, Vector3.zero, Quaternion.identity);

        newPipeDragObject.transform.SetParent(parent.transform);
        GamePipeDragView component = newPipeDragObject.AddComponent <GamePipeDragView>();

        component.gameObject.SetActive(false);
        return(component);
    }