Beispiel #1
0
 public void OnPointerDown(PointerEventData data)
 {
     gc.heldPiece = piece;
     ghost.gameObject.SetActive(true);
     //ghost.GetComponent<Image>().color = new Color(255,255,255,128);
     ghost.GetComponent <Image>().sprite = gc.GetPieceImage(piece);
     ghost.position = data.position;
 }
 public void OnDrag(PointerEventData data)
 {
     if (moving)
     {
         ghost.gameObject.SetActive(true);
         ghost.GetComponent <Image>().sprite = example.GetPieceImage(example.heldPiece);
         ghost.position = data.position;
     }
 }