示例#1
0
 public void enableC()
 {
     testTubeA = GameObject.Find("ElementA_text").GetComponent <TestTubeA> ();
     print("im here" + testTubeA.isElementAActive());
     testTubeB         = GameObject.Find("ElementB_text").GetComponent <TestTubeB> ();
     isTestTubesActive = true;
 }
    public void HandleTimedInput()
    {
        if (currentObj.name == "ElementB_text")
        {
            if (call.getmixElementBType() == "liquid")
            {
                addBColor = GameObject.Find("test-tube_solutionB").GetComponent <addTestTubeBColor> ();
                print("hereeeeeee");
                if (isElementBadded == false)
                {
                    addBColor.addColortoMix();
                    isElementBadded = true;
                }
            }
            animationB = GameObject.Find("Test-tube-B").GetComponent <Animation> ();
            animationB.Play();



            // return new WaitForSeconds(2);
            StartCoroutine(WaitForAnimation());
            mixCheckOrder.setElement(call.getmixElementB());

            testTubeB = GameObject.Find("ElementB_text").GetComponent <TestTubeB> ();

            testTubeB.setElementB(true);
        }
    }
示例#3
0
    void Start()
    {
        currentObj = gameObject;
        gameViewer = currentObj.transform.gameObject;
        camera     = GameObject.FindGameObjectWithTag("MainCamera");

        if (isTestTubesActive == true)
        {
            testTubeA = GameObject.Find("ElementA_text").GetComponent <TestTubeA> ();

            testTubeB = GameObject.Find("ElementB_text").GetComponent <TestTubeB> ();
        }

        if (mixEx != null)
        {
            mixEx.SetActive(false);
        }
    }