示例#1
0
    void DeselectManeuverNodeVector()
    {
        if (selectedManeuverVector == null)
            return;

        selectedManeuverVector.EndVectorSelect();
        selectedManeuverVector = null;
    }
示例#2
0
 void SelectManeuverNodeVector()
 {
     RaycastHit2D[] rayHits = Physics2D.GetRayIntersectionAll(mainCamera.ScreenPointToRay(Input.mousePosition), 100f, vectorLayerMask);
     for (int i = 0; i < rayHits.Length; i++)
     {
         RaycastHit2D hit = rayHits[i];
         selectedManeuverVector = hit.collider.GetComponent<ManeuverVectorHandler>();
         if (selectedManeuverVector == null)
             continue;
         
         selectedManeuverVector.InitializeVectorSelect(mainCamera.ScreenToWorldPoint(Input.mousePosition));
     }
 }