Inheritance: MonoBehaviour
 // Use this for initialization
 void Start()
 {
     rend = GetComponent<Renderer>();
     grabScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<GrabDropScript>();
     source = GetComponent<AudioSource>();
     pec = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>();
 }
Beispiel #2
0
 // 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>();
     logScript = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<log>();
     source = GetComponent<AudioSource>();
     origin = transform.position;
     isSnapped = false;
     pcard = GameObject.FindGameObjectWithTag("MainCamera").GetComponent<PecCard>();
 }
 // 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();
 }
Beispiel #5
0
    //int negativeCounter;
    //int positiveCounter;
    //int notTrNegativeCounter;
    //int notTrPositiveCounter;
    //float delay = 3000f;



    void Awake()
    {
        //.playerIndex == 0) ?
        p1Index        = 0;
        p2Index        = 1;
        _PecCard       = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <PecCard>();
        _KinectManager = GameObject.FindGameObjectWithTag("MainCamera").GetComponent <KinectManager>();

//		faceMat1=face1.GetComponent<Renderer>();//change to left and right
//		faceMat2=face2.GetComponent<Renderer>();//change left and right
        //stars=engagement.GetComponentsInChildren<Animator>();
//		faceMat1.material.shader=Shader.Find("Specular");
//		faceMat2.material.shader=Shader.Find("Specular");
    }
Beispiel #6
0
    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;
    }
Beispiel #7
0
    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>();
    }
    // 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);
    }