void checkDesign(XRSocketInteractor s1, XRSocketInteractor s2, XRSocketInteractor s3, XRSocketInteractor s4, XRSocketInteractor s5)
 {
     if (s1.m_ValidTargets.Count > 0 && s2.m_ValidTargets.Count > 0 && s3.m_ValidTargets.Count > 0 && s4.m_ValidTargets.Count > 0 && s5.m_ValidTargets.Count > 0)
     {
         isComplete = true;
     }
 }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        socket = GetComponent <XRSocketInteractor>();

        socket.onSelectEnter.AddListener(OnSocketEnter);
        socket.onSelectExit.AddListener(OnSocketExit);
    }
Example #3
0
 internal static XRSocketInteractor CreateSocketInteractor()
 {
     GameObject interactorGO = new GameObject("Socket Interactor");
     CreateGOSphereCollider(interactorGO);
     XRSocketInteractor interactor = interactorGO.AddComponent<XRSocketInteractor>();
     return interactor;
 }
Example #4
0
 // Start is called before the first frame update
 void Start()
 {
     num_batteries = int.Parse(batteryCount.text);
     dropZone      = GetComponent <XRSocketInteractor>();
     dropZone.onSelectEntered.AddListener(AddBattery);
     dropZone.onSelectExited.AddListener(RemoveBattery);
 }
Example #5
0
    void Start()
    {
        colorSocket    = transform.parent.Find("ColorPlug").GetComponent <XRSocketInteractor>();
        emissionSocket = transform.parent.Find("EmissionPlug").GetComponent <XRSocketInteractor>();

        previousColor    = colorSocket.selectTarget;
        previousEmission = emissionSocket.selectTarget;
    }
Example #6
0
    void Awake()
    {
        XRSocketInteractor socket = gameObject.GetComponent <XRSocketInteractor>();

        //socket.onSelectEntered.AddListener(HatCheck);

        nut  = GameObject.FindGameObjectWithTag("HexNut");
        nut1 = GameObject.FindGameObjectWithTag("HexNut1");
        Debug.Log("socket from Awake: " + socket);
    }
Example #7
0
    void Awake()
    {
        XRSocketInteractor socket = gameObject.GetComponent <XRSocketInteractor>();

        //socket.onSelectEntered.AddListener(HatCheck);

        //socket.selectEntered.AddListener();

        cap = GameObject.FindGameObjectWithTag("BaseballHat");
        Debug.Log("socket from Awake: " + socket);
    }
 // Start is called before the first frame update
 void Start()
 {
     currentHealth        = maxHealth;
     healthBar.fillAmount = currentHealth / 100;
     manaImage.fillAmount = (manaMax / 100);
     currentMana          = manaMax;
     socketSettings       = spellSocket.GetComponent <XRSocketInteractor>();
     spellSocket.SetActive(false);
     teleportHand.SetActive(false);
     teleportSpell.enabled = false;
     currentSpell          = spellMedal[0];
     searchDevice();
     StartCoroutine(ManaAdd());
 }
 double getVoltage(XRSocketInteractor snap, XRSocketInteractor snapVolt, int i)
 {
     if (i == 0)
     {
         return(9.0);
     }
     else if (i == 4)
     {
         return(0.0);
     }
     else
     {
         return(0.5 * (resistances[i]));
     }
 }
Example #10
0
    public override void OnInspectorGUI()
    {
        XRSocketInteractor soc = (XRSocketInteractor)target;

        DrawDefaultInspector();
    }
 void OnEnable()
 {
     m_SocketInteractor = GetComponent <XRSocketInteractor>();
     m_SocketInteractor.onSelectExit.AddListener(ObjectGrabbed);
 }
Example #12
0
 // Start is called before the first frame update
 void Start()
 {
     _socket = GetComponent <XRSocketInteractor>();
 }