// Use this for initialization void Start() { interaction1 = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <InteractionManager>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); active = false; gameOver = false; }
// Use this for initialization void Start() { rend = GetComponent <Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); source = GetComponent <AudioSource>(); pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PecCard>(); }
// Use this for initialization void Start() { interaction1 = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<InteractionManager>(); grabScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<GrabDropScript>(); active = false; gameOver = false; }
// Use this for initialization void Start() { rend = GetComponent<Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); source = GetComponent<AudioSource>(); pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>(); }
// Use this for initialization void Start() { rend = GetComponent <Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); source = GetComponent <AudioSource>(); origin = this.transform.position; isSnapped = false; }
// Use this for initialization void Start() { rend = GetComponent<Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); source = GetComponent<AudioSource>(); origin = this.transform.position; isSnapped = false; }
// set gravity on or off private void SetGravity(bool gravityOn) { GrabDropScript compGrabDrop = GetComponent <GrabDropScript>(); if (compGrabDrop != null && compGrabDrop.useGravity != gravityOn) { compGrabDrop.useGravity = gravityOn; } }
// Use this for initialization void Start() { //pec = new GameObject[arraySize]; grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); source = GetComponent<AudioSource>(); result = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<Timer>(); scriptLog = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); }
// reset objects if needed private void ResetObjects(bool resetObjs) { if (resetObjs) { GrabDropScript compGrabDrop = GetComponent <GrabDropScript>(); if (compGrabDrop != null) { compGrabDrop.resetObjects = true; } } }
// Use this for initialization void Start() { rend = GetComponent <Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); coinCounter = 0; logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <log>(); source = GetComponent <AudioSource>(); pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PecCard>(); scoreKeep = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <ScoreKeep>(); scoreVector = new Vector3(0, 25, 0); scoreKeepBody = GameObject.Find("BodyPlaceHolders").GetComponent <ScoreKeep>(); gameManager = GameManager.getInstance(); }
void Start() { //Associates to scripts in MainCamera grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); //logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); pcard = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PecCard>(); //Associates to the Components in attached object rend = GetComponent <Renderer>(); source = GetComponent <AudioSource>(); origin = transform.position; IsSnapped = false; }
void Start() { //Associates the Components in the MainCamera to these variables grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); pecScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PecCard>(); player1 = GameObject.FindGameObjectWithTag("MainCamera").GetComponents <InteractionManager>()[0]; player2 = GameObject.FindGameObjectWithTag("MainCamera").GetComponents <InteractionManager>()[1]; logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <log>(); rend = GetComponent <Renderer>(); //Gets the Renderer from the object attached to this script partOrigin = gameObject.transform.position; //Saves the position of the attached object color = rend.material.color; //Saves the color of the attached object _PositionManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Positionmanager>(); }
void Start() { //pec = new GameObject[arraySize]; //Associate the variables with Components in the MainCamera grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); interactionManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponents <InteractionManager>(); result = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <Timer>(); scriptLog = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <log>(); engagementMeter = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <EngagementMeter>(); faceTrackingManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <FacetrackingManager>(); scoreKeepBody = GameObject.Find("BodyPlaceHolders").GetComponent <ScoreKeep>(); source = GetComponent <AudioSource>(); //Gets AudioSource from the attached Object }
void keepInPlace(Collider other) { int i = 0; grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); //nulls the element in the array with the same name as current object that just snapped Debug.Log ("Sent " + other.gameObject.tag); for(i = 0; i < grabScript.draggableObjects.Length; i++){ if(other.gameObject.tag == grabScript.draggableObjects[i].tag) { Debug.Log ("Current GameObject " + grabScript.draggableObjects[i].tag); grabScript.draggableObjects[i] = emptyObject; } //else Debug.Log ("Current GameObject outside " + grabScript.draggableObjects[i].tag); } }
public void keepInPlace(Collider other) { int i = 0; grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); //nulls the element in the array with the same name as current object that just snapped Debug.Log("Sent " + other.gameObject.tag); for (i = 0; i < grabScript.draggableObjects.Length; i++) { if (other.gameObject.tag == grabScript.draggableObjects[i].tag) { Debug.Log("Current GameObject " + grabScript.draggableObjects[i].tag); grabScript.draggableObjects[i] = emptyObject; } //else Debug.Log ("Current GameObject outside " + grabScript.draggableObjects[i].tag); } }
// Use this for initialization void Start() { grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); }
// Use this for initialization void Start() { grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <GrabDropScript>(); }
// Use this for initialization void Start() { grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); pecScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<PecCard>(); rend = GetComponent<Renderer>(); partOrigin = gameObject.transform.position; color = rend.material.color; player1 = (GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[0].playerIndex == 0) ? GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[0] : GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[1]; player2 = GameObject.FindGameObjectWithTag("MainCamera").GetComponents<InteractionManager>()[1]; logScript = GameObject.FindGameObjectWithTag ("MainCamera").GetComponent<log>(); }
// Use this for initialization void Start() { rend = GetComponent<Renderer>(); grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>(); logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>(); source = GetComponent<AudioSource>(); pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>(); scoreKeep = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<socket>(); scoreVector = new Vector3 (0,25,0); }