Beispiel #1
0
    void Start()
    {
        target = GameObject.Find("RotSheet").transform;

        greenSheet   = GameObject.Find("GreenSheet").GetComponent <GreenSheet>();
        boxCollision = GameObject.Find("BoxCollision").GetComponent <BoxCollision>();

        audioSource = gameObject.GetComponent <AudioSource>();
    }
Beispiel #2
0
    void Start()
    {
        sheet = gameObject.GetComponent <Renderer>();

        {
            GameObject obj = GameObject.Find("RedSheet");
            redSheet = obj.GetComponent <RedSheet>();
        }

        {
            GameObject obj = GameObject.Find("GreenSheet");
            greenSheet = obj.GetComponent <GreenSheet>();
        }
    }