예제 #1
0
    public void OnDrag(PointerEventData eventData)
    {
        newPos             = Input.mousePosition + relativePosition;
        newPos             = grid.getGridPosition(newPos);
        rectTrans.position = newPos;
//		checkNeighbors ();
    }
예제 #2
0
 public void OnDrag(PointerEventData eventData)
 {
     newPos = Input.mousePosition + shiftPos;
     newPos = grid.getGridPosition(newPos);
     //		newPos.z = 0;
     rectTrans.localPosition = newPos;
 }
예제 #3
0
파일: dragModifier.cs 프로젝트: Zihn/Shapes
    public void OnDrag(PointerEventData eventData)
    {
        modification = Input.mousePosition - startPosition;         // just need difference no need for correction
        Vector2 newV = grid.getGridPosition(new Vector2(baseWidth + modification.x, baseHeight + (sign * modification.y)));

        if (newV != Vector2.zero)
        {
            modifyShape(newV);
        }
    }
예제 #4
0
파일: spawnShapes.cs 프로젝트: Zihn/Shapes
 public void OnDrag(PointerEventData eventData)
 {
     newPos             = Input.mousePosition;
     newPos             = grid.getGridPosition(newPos);
     rectTrans.position = newPos;
 }