コード例 #1
0
 public void SendArrowAction(GameObject first, GameObject second, PointAbleOption pointType)
 {
     if (pointType == PointAbleOption.Card && !second.CompareTag(first.tag))
     {
         var c1 = first.GetComponent <CardModel>().GetCard;
         var c2 = second.GetComponent <CardModel>().GetCard;
         Debug.Log("Can attack: " + CardLogic.CanAttack(c1, c2));
     }
 }
コード例 #2
0
ファイル: ArrowController.cs プロジェクト: Gleed13/Demo
    public void OnDropHandler(GameObject eventObject, PointAbleOption type)
    {
        if (startPoint == eventObject)
        {
            return;
        }

        endPoint     = eventObject;
        endPointType = type;
    }
コード例 #3
0
ファイル: ArrowController.cs プロジェクト: Gleed13/Demo
    public void OnPointerExitHandler(GameObject eventObject)
    {
        if (startPoint == eventObject)
        {
            return;
        }


        if (startPointType == endPointType)
        {
            Debug.Log(eventObject.name + " exited");
//            endPoint.GetComponent<VisualPlatform>().ChangeZoneColor(Color.green);
        }

        endPoint     = null;
        endPointType = PointAbleOption.Null;
    }
コード例 #4
0
ファイル: ArrowController.cs プロジェクト: Gleed13/Demo
    public void OnPointerEnterHandler(GameObject eventObject, PointAbleOption type)
    {
        if (startPoint == eventObject)
        {
            return;
        }


        endPoint     = eventObject;
        endPointType = type;

        if (startPointType == endPointType)
        {
            Debug.Log(eventObject.name + " entered");
//            endPoint.GetComponent<VisualPlatform>().ChangeZoneColor(Color.red);
        }
    }
コード例 #5
0
ファイル: ArrowController.cs プロジェクト: Gleed13/Demo
    public void EndPoint()
    {
        if (startPoint && endPoint && startPointType == endPointType)
        {
            Debug.Log("start = " + startPoint.name);
            Debug.Log("end = " + endPoint.name);
            Debug.Log("type = " + startPointType);

            GameController.Instance.SendArrowAction(startPoint, endPoint, startPointType);
        }

        startPoint = null;
        endPoint   = null;

        startPointType = PointAbleOption.Null;
        endPointType   = PointAbleOption.Null;
    }
コード例 #6
0
ファイル: ArrowController.cs プロジェクト: Gleed13/Demo
 public void StartPoint(GameObject eventObject, PointAbleOption type)
 {
     //remember on which platform the drag begins
     startPoint     = eventObject;
     startPointType = type;
 }