Exemplo n.º 1
0
 public void StopDrag()
 {
     answerField         = lastField;
     collidedField.Value = lastField;
     Debug.Log(answerField);
     TryEnter();
 }
Exemplo n.º 2
0
        //漢字フィールドから出た時
        void OnTriggerExit2D(Collider2D collision)
        {
            AnswerField exitAnswerfield = collision.GetComponent <AnswerField>();

            if (exitAnswerfield != null && exitAnswerfield == collidedField.Value)
            {
                collidedField.Value = null;
            }
        }
Exemplo n.º 3
0
        public void BeginDrag()
        {
            if (!answerField)
            {
                return;
            }

            answerField.RemoveParts(this);
            lastField   = answerField;
            answerField = null;
        }
Exemplo n.º 4
0
 void TryEnter()
 {
     if (answerField != null && answerField.IsSettable(this))
     {
         answerField.SetParts(this);
         //transform.position = (Vector2) Camera.main.WorldToScreenPoint(answerField.transform.position);
         transform.position = (Vector2)answerField.transform.position;
         RpcDropOnAnswer(answerField.transform.lossyScale);
     }
     else
     {
         transform.position = pieceFieldPos;
         RpcBackStartPos();
     }
     lastField = null;
 }
Exemplo n.º 5
0
 public void EndDrag()
 {
     answerField = collidedField.Value;
     TryEnter();
 }