Exemple #1
0
 protected void BreakOffPoint(object sender, ControllerInteractionEventArgs e)
 {
     if (prevPoint)
     {
         prevPoint.SetLinePos(prevPoint.transform.position);
         prevPoint = null;
     }
     if (currPoint)
     {
         Destroy(currPoint.gameObject);
         CreatePointCallback();
     }
 }
Exemple #2
0
    private void CreatePointCallback()
    {
        if (currPoint)
        {
            currPoint.PlacePoint();
            prevPoint      = currPoint;
            prevPointColor = VRMPoint.RandColor();
            prevPoint.SetEndColor(prevPointColor);
        }

        GameObject vrPointObj = (GameObject)Instantiate(vrPointPrefab,
                                                        controller.transform.position,
                                                        Quaternion.identity);

        currPoint = vrPointObj.GetComponent <VRMPoint>();
        currPoint.LinkedController = gameObject;
        currPoint.SetStartColor(prevPointColor);
    }
Exemple #3
0
 void Start()
 {
     prevPointColor = VRMPoint.RandColor();
     CreatePointCallback();
 }