public void UpdateStereoDepth(Transform trackingReference)
 {
     if (this.mSkewFrustum && base.IsVideoBackgroundEnabled())
     {
         StateManager arg_26_0 = TrackerManager.Instance.GetStateManager();
         float        num      = float.PositiveInfinity;
         using (IEnumerator <TrackableBehaviour> enumerator = arg_26_0.GetActiveTrackableBehaviours().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 Vector3 position = enumerator.Current.gameObject.transform.position;
                 float   z        = trackingReference.InverseTransformPoint(position).z;
                 if (z < num)
                 {
                     num = z;
                 }
             }
         }
         using (Dictionary <Camera, VideoBackgroundAbstractBehaviour> .ValueCollection.Enumerator enumerator2 = this.mVideoBackgroundBehaviours.Values.GetEnumerator())
         {
             while (enumerator2.MoveNext())
             {
                 enumerator2.Current.SetStereoDepth(num);
             }
         }
     }
 }
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                if (i % 300 == 0)
                {
                    string      name = tb.TrackableName;
                    ImageTarget it   = tb.Trackable as ImageTarget;
                    Vector2     size = it.GetSize();

                    Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                    //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                    if (name == "Cl" || lastimagename == "Na")
                    {
                        Instantiate(NaCl, new Vector3(-75, -4, -10), Quaternion.identity);
                    }
                    lastimagename = name;
                }
                i = i + 1;
                if (i >= 10000)
                {
                    i = 0;
                }
            }
        }
Beispiel #3
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + " -size: " + size.x + " , " + size.y);

                TextTargetName.GetComponent <Text>().text = name;
                TextTitle.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);

                Debug.Log("NAME: " + name);
                if (name == "miniqr")
                {
                    TextTitle.GetComponent <Text>().text       = "MINI";
                    TextDescription.GetComponent <Text>().text = "MINI is a British automotive marque, owned by BMW since 2000, and used by them for a range of small cars. The word Mini has been used in car model names since 1959, and in 1969 it became a marque in its own right when the name Mini replaced the separate Austin Mini and Morris Mini car model names. BMW acquired the marque in 1994 when it bought Rover Group (formerly British Leyland), which owned Mini, among other brands.";
                }

                if (name == "target_bmw")
                {
                    TextTitle.GetComponent <Text>().text       = "BMW";
                    TextDescription.GetComponent <Text>().text = "BMW is a German multinational company which currently produces automobiles and motorcycles, and also produced aircraft engines until 1945. The company was founded in 1916 and has its headquarters in Munich, Bavaria. BMW produces motor vehicles in Germany, Brazil, China, India, South Africa, the United Kingdom and the United States. In 2015, BMW was the world's twelfth largest producer of motor vehicles, with 2,279,503 vehicles produced. The Quandt family are long-term shareholders of the company, with the remaining stocks owned by public float.";
                }
            }
        }
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);

                if (name == "Kubus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/kubus"); });
                    TextDescription.GetComponent <Text>().text = "Kubus adalah bangun ruang tiga dimensi yang dibatasi oleh enam bidang sisi yang kongruen berbentuk bujur sangkar. Kubus memiliki 6 sisi, 12 rusuk dan 8 titik sudut. Kubus juga disebut bidang enam beraturan, selain itu juga merupakan bentuk khusus dalam prisma segiempat.";
                }

                if (name == "Balok")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/balok"); });
                    TextDescription.GetComponent <Text>().text = "Balok adalah bangun ruang tiga dimensi yang dibentuk oleh tiga pasang persegi atau persegi panjang, dengan paling tidak satu pasang di antaranya berukuran berbeda. Balok memiliki 6 sisi, 12 rusuk dan 8 titik sudut. Balok yang dibentuk oleh enam persegi sama dan sebangun disebut sebagai kubus.";
                }
                if (name == "Tabung")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/tabung"); });
                    TextDescription.GetComponent <Text>().text = "Dalam geometri, tabung atau silinder adalah bangun ruang tiga dimensi yang dibentuk oleh dua buah lingkaran identik yang sejajar dan sebuah persegi panjang yang mengelilingi kedua lingkaran tersebut. Tabung memiliki 3 sisi dan 2 rusuk.";
                }
                if (name == "Kerucut")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/kerucut"); });
                    TextDescription.GetComponent <Text>().text = "Dalam geometri, kerucut adalah sebuah limas istimewa yang beralas lingkaran. Kerucut memiliki 2 sisi dan 1 rusuk. Sisi tegak kerucut tidak berupa segitiga tapi berupa bidang miring yang disebut selimut kerucut.";
                }
                if (name == "Limas")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/limas"); });
                    TextDescription.GetComponent <Text>().text = "Dalam geometri, limas adalah bangun ruang tiga dimensi yang dibatasi oleh alas berbentuk segi-n dan sisi-sisi tegak berbentuk segitiga. Limas memiliki n + 1 sisi, 2n rusuk dan n + 1 titik sudut. ... Limas dengan alas berupa persegi disebut juga piramida.";
                }
                if (name == "Prisma")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/prisma"); });
                    TextDescription.GetComponent <Text>().text = "Dalam geometri, prisma adalah bangun ruang tiga dimensi yang dibatasi oleh alas dan tutup identik berbentuk segi-n dan sisi-sisi tegak berbentuk persegi atau persegi panjang. Dengan kata lain prisma adalah bangun ruang yang mempunyai penampang melintang yang selalu sama dalam bentuk dan ukuran.";
                }
                if (name == "Bola")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/bola"); });
                    TextDescription.GetComponent <Text>().text = "Dalam geometri, bola adalah bangun ruang tiga dimensi yang dibentuk oleh tak hingga lingkaran berjari-jari sama panjang dan berpusat pada satu titik yang sama. Bola hanya memiliki 1 sisi.";
                }
            }
        }
Beispiel #5
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonPlay.gameObject.SetActive(true);
                ButtonPause.gameObject.SetActive(true);
                ButtonStop.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);


                //If the target name was “zombie” then add listener to ButtonAction with location of the zombie sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie

                if (name == "2018")
                {
                    if (AudioListener.pause == true)
                    {
                        ButtonPause.GetComponent <Button>().onClick.AddListener(delegate { playSoundPause(); });
                    }
                    else
                    {
                        ButtonPlay.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/zombie"); });
                    }
                    ButtonStop.GetComponent <Button>().onClick.AddListener(delegate { playSoundStop("sounds/zombie"); });

                    TextDescription.GetComponent <Text>().text = "A zombie (Haitian French: zombi, Haitian Creole: zonbi) is a fictional undead being created through the reanimation of a human corpse. Zombies are most commonly found in horror and fantasy genre works.";
                }



                //If the target name was “unitychan” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot

                if (name == "2018-2")
                {
                    ButtonPlay.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/zombie"); });
                    ButtonPause.GetComponent <Button>().onClick.AddListener(delegate { playSoundPause(); });
                    ButtonStop.GetComponent <Button>().onClick.AddListener(delegate { playSoundStop("sounds/zombie"); });
                    TextDescription.GetComponent <Text>().text = "A robot is a mechanical or virtual artificial agent, usually an electromechanical machine that is guided by a computer program or electronic circuitry, and thus a type of an embedded system.";
                }
            }
        }
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                ButtonAction1.gameObject.SetActive(true);
                ButtonAction2.gameObject.SetActive(true);
                ButtonAction3.gameObject.SetActive(true);
                ButtonAction4.gameObject.SetActive(true);
                ButtonAction5.gameObject.SetActive(true);
                ButtonAction6.gameObject.SetActive(true);
                ButtonAction7.gameObject.SetActive(true);
                ButtonAction8.gameObject.SetActive(true);
                ButtonAction9.gameObject.SetActive(true);
                ButtonAction10.gameObject.SetActive(true);
                ButtonAction11.gameObject.SetActive(true);
                ButtonAction12.gameObject.SetActive(true);
                ButtonAction13.gameObject.SetActive(true);
                ButtonAction14.gameObject.SetActive(true);
                ButtonAction15.gameObject.SetActive(true);
                ButtonAction16.gameObject.SetActive(true);
                ButtonAction17.gameObject.SetActive(true);
                ButtonAction18.gameObject.SetActive(true);
                ButtonAction19.gameObject.SetActive(true);
                ButtonAction21.gameObject.SetActive(true);
                ButtonAction22.gameObject.SetActive(true);
                ButtonAction23.gameObject.SetActive(true);
                ButtonAction24.gameObject.SetActive(true);
                ButtonAction25.gameObject.SetActive(true);
                ButtonAction26.gameObject.SetActive(true);
                ButtonAction27.gameObject.SetActive(true);
                ButtonAction28.gameObject.SetActive(true);
                ButtonAction29.gameObject.SetActive(true);
                ButtonAction30.gameObject.SetActive(true);
                ButtonAction31.gameObject.SetActive(true);
                ButtonAction32.gameObject.SetActive(true);
                ButtonAction33.gameObject.SetActive(true);
                ButtonAction34.gameObject.SetActive(true);
                ButtonAction35.gameObject.SetActive(true);
                ButtonAction36.gameObject.SetActive(true);
                ButtonAction37.gameObject.SetActive(true);
                ButtonAction38.gameObject.SetActive(true);
                ButtonAction39.gameObject.SetActive(true);
                ButtonAction40.gameObject.SetActive(true);
            }
        }
Beispiel #7
0
    bool DoAnchorsExist()
    {
        if (m_StateManager != null)
        {
            IEnumerable <TrackableBehaviour> trackableBehaviours = m_StateManager.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour behaviour in trackableBehaviours)
            {
                if (behaviour is AnchorBehaviour)
                {
                    return(true);
                }
            }
        }
        return(false);
    }
Beispiel #8
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);


                //If the target name was “zombie” then add listener to ButtonAction with location of the zombie sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie

                if (name == "buddha_thi")
                {
                    ButtonAction.GetComponent <Button> ().onClick.AddListener(delegate {
                        playSound("sounds/A Loop In Time by Wally Brill");
                    });
                    TextDescription.GetComponent <Text>().text = "Despite cultural and regional differences in the interpretations of texts about the life of Gautama Buddha, there are some general guidelines to the attributes of a Buddharupa:.";
                }



                //If the target name was “unitychan” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot

                if (name == "Ramses")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("dr"); });
                    TextDescription.GetComponent <Text>().text = "was the third pharaoh of the Nineteenth Dynasty of Egypt. He often is regarded as the greatest, most celebrated, and most powerful pharaoh of the Egyptian Empire His successors and later Egyptians called him the \"Great Ancestor\". He is known as Ozymandias in the Greek sources,from a transliteration into Greek of a part of Ramesses' throne name";
                }
                if (name == "Nefertiti")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("dr"); });
                    TextDescription.GetComponent <Text>().text = "was an Egyptian queen and the Great Royal Wife (chief consort) of Akhenaten, an Egyptian Pharaoh. Nefertiti and her husband were known for a religious revolution, in which they worshiped one god only, Aten, or the sun disc. With her husband, she reigned at what was arguably the wealthiest period of Ancient Egyptian history.Some scholars believe that Nefertiti ruled briefly as Neferneferuaten after her husband's death and before the accession of Tutankhamun, although this identification is a matter of ongoing debate.If Nefertiti did rule as Pharaoh, her reign was marked by the fall of Amarna and relocation of the capital back to the traditional city of Thebes.\n\nNefertiti had many titles including Hereditary Princess (iryt-p`t); Great of Praises (wrt-hzwt); Lady of Grace (nbt-im3t), Sweet of Love (bnrt-mrwt); Lady of The Two Lands (nbt-t3wy); Main King's Wife, his beloved (hmt-niswt-‘3t meryt.f); Great King's Wife, his beloved (hmt-niswt-wrt meryt.f), Lady of all Women (hnwt-hmwt-nbwt); and Mistress of Upper and Lower Egypt (hnwt-Shm’w-mhw).\n\nShe was made famous by her bust, now in Berlin's Neues Museum, shown to the right. The bust is one of the most copied works of ancient Egypt. It was attributed to the sculptor Thutmose, and it was found in his workshop. The bust is notable for exemplifying the understanding Ancient Egyptians had regarding realistic facial proportions.[citation needed]";
                }
            }
        }
Beispiel #9
0
        // function called once per frame
        void Update()
        {
            StateManager managedState = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> trackedBehaviours = managedState.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour behaviourTracked in trackedBehaviours)
            {
                string      name        = behaviourTracked.TrackableName;
                ImageTarget targetImage = behaviourTracked as ImageTarget;
                Vector2     size        = targetImage.GetSize();

                Debug.Log("Active image target" + name + "size" + size.x + ", " + size.y);


                //the infos

                if (name == "R38ClassA")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is the r38 a class airship";
                }

                else if (name == "Lak2Genesis")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is the lak2 genesis a class airship";
                }

                else if (name == "Cess185")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is the cessna185 a class airship";
                }

                else if (name == "Boeing747Target")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is the b747 a class airship";
                }

                else if (name == "AirBalloonBP")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is an air balloon a class airship";
                }

                else if (name == "Bell206L4")
                {
                    aircraftSpecs.GetComponent <Text>().text = "This is the bell a class airship";
                }
            }
        }
Beispiel #10
0
    public void SaveInEditor(string filename = "aaa.json")
    {
        Vuforia.StateManager stateManager = Vuforia.TrackerManager.Instance.GetStateManager();

        List <SerializedData> list = new List <SerializedData>();

        // 인식된 가구들
        var trackable = stateManager.GetActiveTrackableBehaviours();

        if (trackable == null)
        {
            Debug.Log("Trackable : " + trackable);
        }
        // Warning : 아니 이게 유니티 애디터에서는 아래 포문을 돌지 않는데
        // 안드로이드로 빌드하면 한번을 도는 문제가 있다.
        foreach (var t in ObjectToSaveInEditor)
        {
            Debug.Log("trackables : " + t);
            SerializedObject so = t.GetComponentInChildren <SerializedObject>();
            if (so == null)
            {
                Debug.LogError("Object can't save");
                continue;
            }
            // list에 넣기 전 현상태 불러오기
            GameObject ObjectToSave = t.gameObject.GetComponentInChildren <SerializedObject>().gameObject;
            ObjectToSave.GetComponent <SerializedObject>().SetCurrentState();
            list.Add(ObjectToSave.GetComponent <SerializedObject>().sd);
        }
        // 배열의 내용을 json형식 string으로 저장
        string json = JsonHelper.ToJson <SerializedData>(list.ToArray());

        // 저장 디렉토리 존재여부
        if (!Directory.Exists(Application.dataPath + "/Resources"))
        {
            Directory.CreateDirectory(Application.dataPath + "/Resources");
        }
        string path = Path.Combine(Application.dataPath + "/Resources", filename);

        FileStream   file = new FileStream(path, FileMode.Create, FileAccess.Write);
        StreamWriter sw   = new StreamWriter(file);

        sw.WriteLine(json);
        sw.Close();
        file.Close();
    }
Beispiel #11
0
    // Update is called once per frame
    void Update()
    {
        // Get the Vuforia StateManager
        Vuforia.StateManager sm = Vuforia.TrackerManager.Instance.GetStateManager();

        // Query the StateManager to retrieve the list of
        // currently 'active' trackables
        //(i.e. the ones currently being tracked by Vuforia)
        IEnumerable <Vuforia.TrackableBehaviour> activeTrackables = sm.GetActiveTrackableBehaviours();

        // Iterate through the list of active trackables
        Debug.Log("List of trackables currently active (tracked): ");
        foreach (Vuforia.TrackableBehaviour tb in activeTrackables)
        {
            Debug.Log("Trackable: " + tb.TrackableName);
        }
    }
Beispiel #12
0
    public static int GetNumberOfActiveAnchors()
    {
        int numOfAnchors = 0;

        Vuforia.StateManager stateManager = Vuforia.TrackerManager.Instance.GetStateManager();

        if (stateManager != null)
        {
            foreach (Vuforia.TrackableBehaviour behaviour in stateManager.GetActiveTrackableBehaviours())
            {
                if (behaviour is Vuforia.AnchorBehaviour)
                {
                    numOfAnchors += 1;
                    Debug.Log("Anchor #" + numOfAnchors + ": " + behaviour.TrackableName);
                }
            }
        }
        return(numOfAnchors);
    }
 internal void SetFocusPoint()
 {
     if (this.mSetFocusPlaneAutomatically)
     {
         StateManager arg_23_0 = TrackerManager.Instance.GetStateManager();
         Vector3      point    = Vector3.zero;
         Vector3      vector   = Vector3.zero;
         bool         flag     = false;
         using (IEnumerator <TrackableBehaviour> enumerator = arg_23_0.GetActiveTrackableBehaviours().GetEnumerator())
         {
             while (enumerator.MoveNext())
             {
                 Vector3 position = enumerator.Current.transform.position;
                 Vector3 vector2  = this.mCentralAnchorPoint.transform.InverseTransformPoint(position);
                 if (vector2.z > 0.5f)
                 {
                     if (!flag)
                     {
                         point  = position;
                         vector = vector2;
                         flag   = true;
                     }
                     else
                     {
                         Vector2 vector3 = new Vector2(vector.x, vector.y);
                         Vector2 vector4 = new Vector2(vector2.x, vector2.y);
                         if (vector3.magnitude > vector4.magnitude)
                         {
                             point  = position;
                             vector = vector2;
                         }
                     }
                 }
             }
         }
         if (flag)
         {
             Vector3 normal = -this.mCentralAnchorPoint.transform.forward;
             VuforiaUnity.GetHoloLensApiAbstraction().SetFocusPoint(point, normal);
         }
     }
 }
Beispiel #14
0
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            Run.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Anim.Play("RUN00_F", -1, 0f);
                }
            });


            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);
            }
        }
Beispiel #15
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

//Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);


//If the target name was Water then add listener to ButtonAction with location of the Water sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie

                if (name == "Water")
                {
                    TextDescription.GetComponent <Text>().text = "Water has 2 hydrogen atom, 1 oxygen atom. Polar molecule. Structure is bent. It has 2 lone pair. Angle between two bond is 109.47 degree. Chemical name is Dihydrogen oxide.";
                }



//If the target name was “unitychan” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot

                if (name == "unitychan")
                {
                    TextDescription.GetComponent <Text>().text = "A robot is a mechanical or virtual artificial agent, usually an electromechanical machine that is guided by a computer program or electronic circuitry, and thus a type of an embedded system.";
                }
            }
        }
Beispiel #16
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                Button2Action.gameObject.SetActive(true);
                ScrollView.gameObject.SetActive(true);
                ContentText.gameObject.SetActive(true);

                if (name == "IzmitSaatKulesi" || name == "IzmitSaatKulesi1" || name == "IzmitSaatKulesi2" || name == "IzmitSaatKulesi3")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/saatkulesi");
                    });
                    ContentText.GetComponent <Text>().text = "1900-1901 yıllarında İzmit Mutasarrıfı Musa Kazım Bey denetiminde İzmit Belediyesi tarafından yaptırılmıştır, mimar Vedat Tek’in eseridir.Neoklasik üslupta Hereke ve Tavşancıldan getirilen traverten taşlardan yaptırılan saat kulesi 3,65x3,65 metre ölçülerinde kare planlı olup 4 bölümden oluşmaktadır." +
                                                             "Saat kulesi 16.40 m yüksekliğindedir.Kulenin kuzey cephesinde giriş kısmı bulunmaktadır.1. katın kenarlarında mermer sütunlara, üç kenarında ise  (doğu, batı, güney) çeşmelere yer verilmiştir.Çeşme aynalığında yay içerisinde ay yıldız, ay yıldızın altında da çelenk bulunmaktadır.Çeşmelerin üst kısmındaki bordürlerde kitabe kuşakları yer almaktadır.Kulenin 2. 3. ve 4. katları oldukça hareketli bir şekilde inşa edilmişlerdir." +
                                                             "2. katta köşelerde sütunlara yer verilmiş, her cepheye kaş kemerli açıklıklar konulmuştur.2. katta dökme demir korkuluklardan bir gezinti alanı oluşturulmuştur. Son derece zarif bir yapıda olan korkuluklar döneminin üslup özelliklerini yansıtmaktadır." +
                                                             "Kulenin 3. katında da her cephe yüzeyinde kaş kemerli pencerelere yer verilmiştir. Pencerelerin alt kısımlarında, mermer madalyonlar içerisinde II. Abdülhamid'in tuğrası bulunmaktadır. Ayrıca 3. katın köşelerinde silindirik ve elips şeklindeki düz madalyonlar vardır.Kulenin 4. katında Saat odası yer alır. Dört cephesin de 80 cm çapında saat kadranı bulunmaktadır." +
                                                             "Ünlü Saat Ustası Mustafa Şem-i Pek tarafından yapılan bu saat aktif olarak çalışan son saatlerden biridir. Saatlerin üst kısımlarında üçer pencere kuşağı bulunmaktadır.Saat kulesinin üç tarafında bulunan sebillerin alınlığında ve kapısının üzerinde kitabeler bulunmaktadır.";
                }

                //If the target name was “camii” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot
                if (name == "YeniCumaCamii" || name == "YeniCumaCamii1" || name == "YeniCumaCamii2")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/yenicumacamii");
                    });
                    ContentText.GetComponent <Text>().text = "Pertev Mehmet Paşa Külliyesi, Pertev Mehmet Paşa'nın vefatı ardından vasiyeti gereği Kethüda Sinan Ağa tarafından Mimar Sinan'a yaptırılmıştır." +
                                                             "Padişah II. Selim'in 2. veziri Pertev Mehmet Paşa adına, ölümünden sonra vasiyeti üzerine kethüdası Sinan ağa tarafından yaptırılmış ve cami kitabesine göre miladi 1579(Hicri: 987) yılında tamamlanmıştır." +
                                                             "Camii ile birlikte sübyan mektebi ve hamam kalıntısı ayakta durmaktadır.Külliyeden yalnızca cami ve çeşme özelliklerini koruyarak günümüze gelmiştir." +
                                                             "Süryan mektebi onarımlar sonucu özgün şeklini tamamen yitirmiş,hamam ise harabe halinde temel kalıntıları ve sıcaklığının bir kısmı korunmaktadır.";
                }

                if (name == "GayretGemiMuzesi")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/gayretgemi");
                    });
                    ContentText.GetComponent <Text>().text = "10 Mayıs 1946 yılında ABD tarafından yapılan gemiye USA Everson adı verildi." +
                                                             "1973 yılında USA Everson Gemisi Türk Donanma Komutanlığı'na geçişi yapılarak TCG Gayret adı verildi." +
                                                             "20 yılı aşkın süre içinde bir çok önemli görevi başarıyla yerine getirdi. 1995 yılında hizmet dışına ayrılan TCG Gayret Müze Gemi Projesi kapsamında Kocaeli Valiliği, Kocaeli Büyükşehir Belediyesi ve Donanma Komutanlığı'nın müşterek girişimleri ile modern müzecilik anlayışına göre dekore edilerek," +
                                                             "1997 yılında TCG Gayret Müzesi olarak İzmit sahilinde yeni görevine başlamıştır.";
                }
                if (name == "OsmanHamdiBeyMuzesi")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/osmanhamdibey");
                    });
                    ContentText.GetComponent <Text>().text = "Büyük Türk Müzecisi ve ressamı Osman Hamdi Bey (1842-1910) tarafından Gebze-Eskihisar Köyü'nde," +
                                                             "1884 yılında Köşk, resimhane, kayıkhane ve müştemilat olarak yaptırılmıştır.Planları kendisi tarafından çizilen ve Fransız Mimarisinden etkilenen köşkün yapı malzemelerinin bir çoğu yurtdışından getirilmiştir." +
                                                             "Giriş katındaki ahşap kapıların tablalarına yaptığı çiçek resimlerinin her biri tabloları değerindedir.Osman Hamdi Bey 26 yıl boyunca yaz aylarını geçirdiği köşkte en ünlü tablolarını çizmiştir. ";
                }
                if (name == "SelimSirriPasaKonagi" || name == "SelimSirriPasaKonagi1" || name == "SelimSirriPasaKonagi2")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/sırrıpasakonagi");
                    });

                    ContentText.GetComponent <Text>().text = "Osmanlı'nın ilk yol ve köprü gezici mühendisi unvanına sahip, 1888-1894 yılında İzmit'te Mutasarrıf(Valisi) olan Selim Sırrı Paşa'nın,çizimini bizzat kendisinin yaptığı Selim Sırrı Paşa Konağı 1892 yılında inşa edilmiştir. " +
                                                             "19. yüzyıl sivil mimarlık örneği olan Sırrı Paşa Konağı, 2 katlı ve ahşaptan yapılmış olup konağın iç duvarları antik heykel ve mimari parçaları ile süslenmiştir." +
                                                             "Konağın müştemilatı, Fransa'dan özel olarak getirilen tuğlalarla örülmüştür. Sırrı Paşa Konağı’nın iç mekân duvar bezemelerinin," +
                                                             "Dolmabahçe Sarayı’nın restorasyonunu yapan ressamlar tarafından tezyin edildiği rivayet edilir. Mutasarrıf Sırrı Paşa tarafından yaptırılan zarif mimarisi ve zengin kalemişi süslemeleriyle dikkat çekmektedir.";
                }
                if (name == "KaiserWilhelmKosku")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/wilhelm");
                    });
                    ContentText.GetComponent <Text>().text = "Eski Sümerbank Dokuma ve halı fabrikası sınırları içerisindeki bu köşk Alman İmparatoru II.Wilhelm’in İstanbul-İzmit demiryolunun açılışında İzmit’e geldiğinde kalabilmesi amacı ile yaptırılmıştır. " +
                                                             "İtalyan Mimar Raimondo d’Aranco tarafından yaptırılmıştır.Köşkün mimari parçaları ve detayları Yıldız Sarayı’nda hazırlanmış ve bu parçalar Hereke’de daha önce hazırlanmış taş temeller üzerine oturtularak monte edilmiştir." +
                                                             "Tek katlı olan köşk, geniş bir salon ve bunun çevresindeki odalardan meydana gelmiştir. İzmit Körfezi’ne yönelik cephesine dikdörtgen pencereler sıralanmıştır." +
                                                             "Köşkün üzeri ahşap kiremitli bir çatı ile örtülmüştür.";
                }
                if (name == "KasriHumayun" || name == "KasriHumayun1" || name == "KasriHumayun2")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/kasrihumayun");
                    });
                    ContentText.GetComponent <Text>().text = "İlk kez IV. Murat döneminde ahşap temeller üzerinde inşa edilmiştir." +
                                                             "Ancak yangın ve deprem nedeni ile yıkıldığı anlaşılmıştır.Günümüze ulaşan yapı; Sultan Abdülaziz döneminde (1861-1876) yapılan saraydır." +
                                                             "Neo–Klasik üslupta, Avrupa-Barok stilinde, iki katlı olup cephesi mermer kaplıdır." +
                                                             "Binanın tavan süslemeleri Fransız ressam SASON’un eseridir. Süslemelerde, Osmanlı arması,Abdülaziz’in tuğrası, bayrak, mızrak, balta ve kılıçtan oluşan grup motifleri, çiçek ve meyve bezemeleri bulunmaktadır." +
                                                             "Sarayın namaz kılınmayan serbest bölgesini içine alan alt kat salon tavanında, geyik ve aslan motifleri bulunur. " +
                                                             "Sarayın alt kat zemini mermer,üst kat ahşap mermer parke döşemelidir." +
                                                             "Mimarı Balyan kardeşlerden Amira Karabat BALYAN’dır. Kasr-ı Hümayun’un en önemli özelliği İstanbul dışında yapılan tek saray olmasıdır.";
                }
                if (name == "SaatciAliEfendiKonagi")
                {
                    Button2Action.GetComponent <Button>().onClick.AddListener(delegate {
                        playSound("Sounds/saatcialiefendi");
                    });
                    ContentText.GetComponent <Text>().text = "1776 yılında 1. Abdulhamit zamanında inşa edilmiştir. İzmit’in denize hakim eğimli bir yamacı üzerine inşa edilmiş olan konak ahşap kepenkli ve lokmalı, parmaklıklı pencereleri, dış ve iç duvarlarındaki kalem işi süslemeleriyle dönemini en iyi yansıtan sivil mimarlık örneklerimizdendir.";
                }
            }
        }
Beispiel #17
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                DuaTitle.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                TextDescription1.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);

                if (name == "585628418")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track1"); });
                    DuaTitle.GetComponent <Text>().text         = "Testing";
                    TextDescription.GetComponent <Text>().text  = "أَشْهَدُ أَن لَّا إِلَهَ إِلَّا اللهُ\r\n وَأَشْهدُ أَنَّ مُحَمَّدًا رَسُولُ الله";
                    TextDescription1.GetComponent <Text>().text = "There is no god but Allah,\r\n and Muhammad is His messenger";
                }

                if (name == "SYAHADAH")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track1"); });
                    DuaTitle.GetComponent <Text>().text         = "SYAHADAH";
                    TextDescription.GetComponent <Text>().text  = "أَشْهَدُ أَن لَّا إِلَهَ إِلَّا اللهُ\r\n وَأَشْهدُ أَنَّ مُحَمَّدًا رَسُولُ الله";
                    TextDescription1.GetComponent <Text>().text = "There is no god but Allah,\r\n and Muhammad is His messenger";
                }


                if (name == "DU'A FOR PARENTS")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track2"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A FOR PARENTS";
                    TextDescription.GetComponent <Text>().text  = "رَبِّ اغْفِرْلِي وَلِوَالِدَيَّ وَارْحَمْحُمَا\r\n كَمَا رَبَّيَانِي صَغِيرًا";
                    TextDescription1.GetComponent <Text>().text = "Oh my Lord! Forgive me and my parents \r\n Oh my Lord! Have mercy on both of them \r\n as they cared for me when I was little";
                }

                if (name == "DU'A FOR ENLIGHTENING THE HEART")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track3"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A FOR ENLIGHTENING THE HEART";
                    TextDescription.GetComponent <Text>().text  = "اللَّهُمَّ إِنِّ أَسْأَلُكَ عِلْمًا نَافِعًا\r\n وَرِزْقًا طَيِّبًا وَعَمَلاً مُتَقَبَّلاً";
                    TextDescription1.GetComponent <Text>().text = "Oh Allah! I ask You for useful knowledge, goodly provision and acceptable deeds";
                }

                if (name == "DU'A FOR WEARING GARMENTS")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track4"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A FOR WEARING GARMENTS";
                    TextDescription.GetComponent <Text>().text  = "اَلْحَمْدُلِلَّهِ الَّذِي كَسَانِي هَذَا (الثَّوبَ) \r\nوَرَزَقَنِيهِ مِنْ غَيْرِ حَوْلٍ مِّنِّي وَلَا قُوَّة";
                    TextDescription1.GetComponent <Text>().text = "All praise if for Allah who has clothed me \r\n with this garment and provided it for me,\r\n with no power not might from myself";
                }

                if (name == "DU'A BEFORE ABLUTION")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track5"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A BEFORE ABLUTION";
                    TextDescription.GetComponent <Text>().text  = "بِسْمِ اللهِ وَالْحَمْدُلِلَّه";
                    TextDescription1.GetComponent <Text>().text = "In the name of Allah \r\n and all praise is for Allah";
                }

                if (name == "DU'A AFTER ABLUTION")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track6"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A AFTER ABLUTION";
                    TextDescription.GetComponent <Text>().text  = "أَشْهَدُ أَن لَّا إِلَهَ إِلَّا اللهُ وَحْدَهُ لَاشَرِيكَ لَهُ\r\n وَأَنَّ مُحَمَّدًا عَبْدُهُ وَرَسُولُهُ";
                    TextDescription1.GetComponent <Text>().text = "I bear witness that none has the right \r\n to be worshipped except Allah, alone \r\n without partner, and that Muhammad \r\n is His slave and messenger";
                }

                if (name == "DU'A BEFORE SLEEPING")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track7"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A BEFORE SLEEPING";
                    TextDescription.GetComponent <Text>().text  = "اَللَّهُمَّ بِاسْمِكَ أَحْيَا وَأَمُوتُ";
                    TextDescription1.GetComponent <Text>().text = "In Your name Oh Allah, I live and I die";
                }

                if (name == "DU'A WAKING UP FROM SLEEP")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track8"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A WAKING UP FROM SLEEP";
                    TextDescription.GetComponent <Text>().text  = "الْحَمْدُلِلَّهِ الَّذِي أَحْيَانَا بَعْدَمَا أَمَاتَنَا\r\n وَإِلَيْهِ النُّشُورُ";
                    TextDescription1.GetComponent <Text>().text = "All praises is for Allah who gave us life \r\n after having taken it from us \r\n and unto Him is the resurrection";
                }

                if (name == "DUA_ENTERING_THE_MOSQUE")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track9"); });
                    DuaTitle.GetComponent <Text>().text         = "DUA ENTERING THE MOSQUE";
                    TextDescription.GetComponent <Text>().text  = "اللَّهُمَّ افْتَحْلِي أَبْوَابَ رَحْمَتِكَ";
                    TextDescription1.GetComponent <Text>().text = "Oh Allah open the gates \r\n of Your mercy for me";
                }

                if (name == "DU'A LEAVING THE MOSQUE")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track10"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A LEAVING THE MOSQUE";
                    TextDescription.GetComponent <Text>().text  = "اللَّهُمَّ إِنِّ أَسْأَلُكَ مِن فَضْلِكَ";
                    TextDescription1.GetComponent <Text>().text = "Oh Allah I ask You from Your favour";
                }

                if (name == "DU'A BEFORE EATING")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track11"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A BEFORE EATING";
                    TextDescription.GetComponent <Text>().text  = "اللَّهُمَّ بَارِكْ لَنَا فِيمَا رَزَقْتَنَا\r\n وَقِنَا عَذَابَ النَّارِ";
                    TextDescription1.GetComponent <Text>().text = "Oh Allah! Bless(the food) You have \r\n provided us and save us from \r\n the punishment of the fire";
                }


                if (name == "DU'A AFTER EATING")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track12"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A AFTER EATING";
                    TextDescription.GetComponent <Text>().text  = "الْحَمْدُلِلَّهِ الَّذِي أَطْعَمَنَا وَسَقَانَا\r\n وَجَعَلَنَا مِنَ الْمُسْلِمِين";
                    TextDescription1.GetComponent <Text>().text = "Praise be to Allah Who has fed us, \r\n and given us drink, \r\n and made us Muslims";
                }

                if (name == "DU'A LEAVING THE HOME")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track13"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A LEAVING THE HOME";
                    TextDescription.GetComponent <Text>().text  = "بِسْمِ اللهِ تَوَكَّلْتُ عَلَى اللهِ \r\nلَاحَوْلَ وَلَا قُوَّتَ إِلَّا بِاللهِ";
                    TextDescription1.GetComponent <Text>().text = "In the name of Allah, I place my trust \r\n in Allah and there is no might nor power \r\n except with Allah";
                }

                if (name == "DU'A ENTERING THE HOME")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track14"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A ENTERING THE HOME";
                    TextDescription.GetComponent <Text>().text  = " بِسْمِ اللَّهِ وَلَجْنَا وَبِسْمِ اللَّهِ خَرَجْنَا،\r\n وَعَلَى اللَّهِ رَبَّنَا تَوَكَّلْن";
                    TextDescription1.GetComponent <Text>().text = "In the name of Allah we enter \r\n and in the name of Allah we leave \r\n and upon our Lord we depend";
                }

                if (name == "DU'A BOARDING A VEHICLE")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track15"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A BOARDING A VEHICLE";
                    TextDescription.GetComponent <Text>().text  = "سُبْحَانَ الَّذِي سَخَّرَلَنَا هَذَا وَمَا كُنَّا لَهُ\r\n مُقْرِنِينَ وَإِنَّ إِلى رَبِّنَا لَمُنْقَلِبُونَ";
                    TextDescription1.GetComponent <Text>().text = "Glory to Him Who has provided this \r\n for us though we could never \r\n have had it by our efforts. \r\n Surely unto our Lord we are returning.";
                }

                if (name == "DU'A ENTERING THE TOILET")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track16"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A ENTERING THE TOILET";
                    TextDescription.GetComponent <Text>().text  = "اللَّهُمَّ إِنِّي أَعُوذُبِكَ \r\nمِنَ الْخُبْثِ وَالْخَبَائِث";
                    TextDescription1.GetComponent <Text>().text = "Oh Allah! I seek refuge with you \r\n from all evil and evil-doers";
                }

                if (name == "DU'A LEAVING THE TOILET")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/track17"); });
                    DuaTitle.GetComponent <Text>().text         = "DU'A LEAVING THE TOILET";
                    TextDescription.GetComponent <Text>().text  = "غُفْرَانَكَ الْحَمْدُ لِلَّهِ الَّذِي \r\nأَذْهَبَ عَنِّي الاَذَى وَعَفَانِى";
                    TextDescription1.GetComponent <Text>().text = "I seek forgiveness and pardon from You \r\n All praise be to Allah, who removed \r\n the difficulty from me and give me ease";
                }
            }
        }
Beispiel #18
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                TextTargetName.GetComponent <Text>().text   = name;
                Panel_Text.GetComponent <Text>().text       = name;
                TextTargetNameUI.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);

                PanelDescription.gameObject.SetActive(true);
                PanelDescriptionInside.gameObject.SetActive(true);
                ButtonActionShow.gameObject.SetActive(true);


                if (name == "Mercury")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Mercury_final"); });
                    TextDescription.GetComponent <Text>().text = "   The smallest planet in our solar system and the nearest to the Sun. " +
                                                                 "Mercury is only slightly larger than the Earth's moon. From the surface of Mercury, the Sun would appear more than three " +
                                                                 "times as large as it does when viewed from Earth and the sunlight would be as much as 11 times brighter." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 2,440 km" +
                                                                 "\nDistance from Sun: 57.91 million km" +
                                                                 "\nNumber of moon/s: no moon";
                }
                if (name == "Venus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Venus_final"); });
                    TextDescription.GetComponent <Text>().text = "   The second planet from the Sun and our closest planetary neighbor. Venus " +
                                                                 "is similar in structure and size to Earth. Venus spins slowly in the opposite direction most planets do. Its thick atmosphere " +
                                                                 "traps heat with greenhouse effect, making it the hottest planet in our solar system." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 6,052 km " +
                                                                 "\nDistance from Sun: 108.2 million km" +
                                                                 "\nNumber of moon/s: no moon";
                }
                if (name == "Earth")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Earth_final"); });
                    TextDescription.GetComponent <Text>().text = "   Our home planet is the third planet from the Sun and the only planet we know " +
                                                                 "so far that is inhabited by living things. It is the only world in our solar system with liquid water on the surface. It is just " +
                                                                 "slightly larger than nearby Venus. " +
                                                                 "\nAge: 4.543 billion years" +
                                                                 "\nRadius(Size): 6,371 km " +
                                                                 "\nDistance from Sun: 149.6 million km" +
                                                                 "\nNumber of moon/s: 1 moon";
                }
                if (name == "Mars")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Mars_final"); });
                    TextDescription.GetComponent <Text>().text = "   The fourth planet, and it is a dusty,cold, dessert world with a very thin atmosphere. " +
                                                                 "This dynamic planet has seasons, polar ice caps, extinct volcanoes, canyons and weather. Mars is one of the most explored bodies in our " +
                                                                 "solar system and it is the only planet where we've sent rovers to roam the alien landscape. " +
                                                                 "\nAge: 4.603 billion years" +
                                                                 "\nRadius(Size): 3,390 km" +
                                                                 "\nDistance from Sun: 227.9 million km" +
                                                                 "\nNumber of moon/s: 2 moons (Phobos and Deimos)";
                }
                if (name == "Jupiter")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Jupiter_final"); });
                    TextDescription.GetComponent <Text>().text = "   The fifth planet from the Sun and is, by far, the largest planet in the solar system. " +
                                                                 "It is more than twice as massive as all the other planets combined. Jupiter's stripes and swirls are actually cold. windy clouds of ammonia " +
                                                                 "and water, floating in an atmosphere of hydrogen and helium. Jupiter's iconic Great Red Spot is a giant " +
                                                                 "storm bigger than Earth that has raged for hundreds of years." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 69,911 km" +
                                                                 "\nDistance from Sun: 778.5 million km" +
                                                                 "\nNumber of moon/s: 79 moons";
                }
                if (name == "Saturn")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Saturn_final"); });
                    TextDescription.GetComponent <Text>().text = "   The sixth planet from the Sun and the second largest planet in our solar system. Adorned with " +
                                                                 "a dazzling system of icy rings, Saturn is unique among the planets. It is not the only planet to have rings but none are as spectacular or as " +
                                                                 "complex as Saturn. Saturn is home to some of the most fascinating landscapes in our solar system." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 58,232 km" +
                                                                 "\nDistance from Sun: 1.443 billion km" +
                                                                 "\nNumber of moon/s: 62 moons";
                }
                if (name == "Uranus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Uranus_final"); });
                    TextDescription.GetComponent <Text>().text = "   The seventh planet from the Sun and the third largest planet in our solar system. Uranus is " +
                                                                 "very cold and windy. The ice giant is surrounded by 13 faint rings and 27 small moons as it rotates at a nearby 90 degree angle from the plane of " +
                                                                 "its orbit. This unique tilt make Uranus appear to spin on its side, orbiting the Sun like a rolling ball." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 25,362 km" +
                                                                 "\nDistance from Sun: 2.871 billion km" +
                                                                 "\nNumber of moon/s: 27 moons";
                }
                if (name == "Neptune")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Neptune_final"); });
                    TextDescription.GetComponent <Text>().text = "   Dark, cold and whipped by supersonic winds, ice giant Neptune is the eighth and the most " +
                                                                 "distant planet in our solar system. More than 30 times as far from the Sun as Earth. Neptune is the only planet in our solar system that is not visible " +
                                                                 "to the naked eye. Neptune is so far from the Sun that high noon on the big blue planet would seem like dim twilight to us." +
                                                                 "\nAge: 4.503 billion years" +
                                                                 "\nRadius(Size): 24,622 km" +
                                                                 "\nDistance from the Sun: 4.492 billion km" +
                                                                 "\nNumber of moon/s: 14 moons";
                }
                if (name == "Sun")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/Sun_final"); });
                    TextDescription.GetComponent <Text>().text = "   The Sun is the star at the center of the Solar System. It is a nearly perfect sphere of hot plasma, with " +
                                                                 "internal convective motion that generates a magnetic field via a dynamo process. " +
                                                                 "\nAge: 4.5 billion years" +
                                                                 "\nRadius(Size): 695,508 km";
                }
            }
        }
Beispiel #19
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            Found.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Question.gameObject.SetActive(true);
                    Found.gameObject.SetActive(false);
                    Q1.gameObject.SetActive(true);
                    Q2.gameObject.SetActive(true);
                    Q3.gameObject.SetActive(true);
                    Q4.gameObject.SetActive(true);
                }
            });

            Q1.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFade.gameObject.SetActive(true);
                    Wrong.gameObject.SetActive(true);
                }
            });

            Q2.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFade.gameObject.SetActive(true);
                    Wrong.gameObject.SetActive(true);
                }
            });

            Q3.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    BlackFade.gameObject.SetActive(true);
                    Wrong.gameObject.SetActive(true);
                }
            });

            Q4.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Correct.gameObject.SetActive(true);
                    BlackFade.gameObject.SetActive(true);
                }
            });

            Wrong.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Wrong.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                }
            });

            Correct.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Correct.gameObject.SetActive(false);
                    Question.gameObject.SetActive(false);
                    Q1.gameObject.SetActive(false);
                    Q2.gameObject.SetActive(false);
                    Q3.gameObject.SetActive(false);
                    Q4.gameObject.SetActive(false);
                    Congratulations.gameObject.SetActive(true);
                    BlackFade.gameObject.SetActive(false);
                    Cam.gameObject.SetActive(true);
                    Done.gameObject.SetActive(true);
                }
            });

            Done.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    Done.gameObject.SetActive(false);
                    Congratulations.gameObject.SetActive(false);
                    Cam.gameObject.SetActive(false);
                    KeepSearching.gameObject.SetActive(true);
                    BlackFade.gameObject.SetActive(true);
                }
            });

            KeepSearching.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    KeepSearching.gameObject.SetActive(false);
                    BlackFade.gameObject.SetActive(false);
                    Badge.gameObject.SetActive(true);
                }
            });



            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);
            }
        }
Beispiel #20
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);

                //Marker Anjing
                if (name == "Marker_Anjing")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaraanjing"); });
                    TextDescription.GetComponent <Text>().text = "";
                }

                //Marker Beruang
                if (name == "Marker_Beruang")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaraberuang"); });
                    TextDescription.GetComponent <Text>().text = "";
                }

                //Marker Capung
                if (name == "Marker_Capung")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaracapung"); });
                    TextDescription.GetComponent <Text>().text = "";
                }

                //Marker Domba
                if (name == "Marker_Domba")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaradomba"); });
                    TextDescription.GetComponent <Text>().text = "";
                }
                //Marker Elang
                if (name == "Marker_Elang")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaraelang"); });
                    TextDescription.GetComponent <Text>().text = ".";
                }

                //Marker Gajah
                if (name == "Marker_Gajah")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaragajah"); });
                    TextDescription.GetComponent <Text>().text = ".";
                }

                //Marker Harimau
                if (name == "Marker_Harimau")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suaraharimau"); });
                    TextDescription.GetComponent <Text>().text = ".";
                }

                //Marker Jerapah
                if (name == "Marker_Jerapah")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suarajerapah"); });
                    TextDescription.GetComponent <Text>().text = ".";
                }

                //Marker Kucing
                if (name == "Marker_Kucing")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/suarakucing"); });
                    TextDescription.GetComponent <Text>().text = ".";
                }
            }
        }
Beispiel #21
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);


                //If the target name was “zombie” then add listener to ButtonAction with location of the zombie sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie
                if (name == "Cactus1marker")
                {
                    TextDescription.gameObject.SetActive(false);
                    PanelDescription.gameObject.SetActive(false);
                }

                if (name == "Cactus2marker")
                {
                    TextDescription.gameObject.SetActive(false);
                    PanelDescription.gameObject.SetActive(false);
                }

                if (name == "Cactus3marker")
                {
                    TextDescription.gameObject.SetActive(false);
                    PanelDescription.gameObject.SetActive(false);
                }

                if (name == "Cactus4marker")
                {
                    TextDescription.gameObject.SetActive(false);
                    PanelDescription.gameObject.SetActive(false);
                }

                if (name == "logo")
                {
                    TextDescription.gameObject.SetActive(false);
                    PanelDescription.gameObject.SetActive(false);
                }

                if (name == "qrcactus1")
                {
                    TextDescription.GetComponent <Text>().text = "Golden Barrel Cactus" +
                                                                 "\n\nPrize : IDR 20k" +
                                                                 "\nInclude : Cactus, Pot, Planting Media" +
                                                                 "\nAvailable Stock : >50 pcs" +
                                                                 "\n\nDetails :" +
                                                                 "\nGolden Barrel Cactus" +
                                                                 "Echinocactus grusonii, yang dikenal dengan golden barrel" +
                                                                 "cactus, golden ball atau mother in law cushion, adalah spesies kaktus " +
                                                                 "yang terkenal dan endemik di Meksiko timur-tengah. Kaktus barrel banyak" +
                                                                 "digemari karena mampu bertahan hidup hingga 20 tahun dan bisa tumbuh di daerah tropis " +
                                                                 "yang panas seperti Indonesia.";
                }

                if (name == "qrcactus2")
                {
                    TextDescription.GetComponent <Text>().text = "Haworthia Cactus" +
                                                                 "\n\nPrize : IDR 30k" +
                                                                 "\nInclude : Cactus, Pot, Planting Media" +
                                                                 "\nAvailable Stock : >50 pcs" +
                                                                 "\n\nDetails :" +
                                                                 "\nHaworthia Cactus" +
                                                                 "Haworthis Attenuata (Haworthiopsis attenuata) berasal dari" +
                                                                 "daerah Eastern Cape, Afrika Selatan. Dikenal sebagai tanaman zebra plant/ tanaman daun batu.";
                }

                if (name == "qrcactus3")
                {
                    TextDescription.GetComponent <Text>().text = "Notocactus magnificus" +
                                                                 "\n\nPrize : IDR 40k" +
                                                                 "\nInclude : Cactus, Pot, Planting Media" +
                                                                 "\n\nDetails :" +
                                                                 "\nNotocactus magnificus" +
                                                                 "\nNotocactus magnificus merupakan kaktus ‘standar’ yang cukup sering " +
                                                                 "ditemui di berbagai nursery. Bentuknya bulat dengan rangka yang tegas serta " +
                                                                 "duri-duri halus menghiasi permukaan batangnya.\nMeski terlihat ‘sangar’ dengan " +
                                                                 "duri-durinya, sebenarnya Notocactus magnificus merupakan kaktus dengan tipe duri " +
                                                                 "halus yang bisa dipegang tanpa menggunakan sarung tangan. Kaktus jenis ini bisa tumbuh " +
                                                                 "dalam cluster, bisa juga single plant.";
                }

                if (name == "qrcactus4")
                {
                    TextDescription.GetComponent <Text>().text = "Cactus euphorbia" +
                                                                 "\n\nPrize : IDR 50k" +
                                                                 "\nInclude : Cactus, Pot, Planting Media" +
                                                                 "\n\nDetails :" +
                                                                 "\nKaktus euphorbia." +
                                                                 "\nEuphorbia berasal dari arab saudi dan yaman. Tanaman jenis ini dapat tumbuh hingga 10m " +
                                                                 "dengan batang pendek, mirip beberapa kaktus. Euphorbia tumbuh di daerah berbatu di lereng " +
                                                                 "bukit yang curam. Tanaman euphorbia termasuk tanaman yang langka namun tanaman jenis ini " +
                                                                 "adalah spesies yang mudah  tumbuh dengan baik dibawah sinar matahari.";
                }
            }
        }
Beispiel #22
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

//Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);


//If the target name was “zombie” then add listener to ButtonAction with location of the zombie sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie

                if (name == "bumi")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/bumi"); });
                    TextDescription.GetComponent <Text>().text = "Planet ketiga adalah Bumi yang sering disebut sebagai Planet Biru, bumi merupakan planet dimana kita tinggal. Sebagian besar Bumi ditutupi oleh lautan, sehingga nampak biru. Bumi diselimuti oleh udara tebal yang disebut atmosfer. Fungsi dari atmosfer untuk menyaring panas dari Matahari sehingga tidak terbakar.";
                }



//If the target name was “unitychan” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot

                if (name == "venus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/venus"); });
                    TextDescription.GetComponent <Text>().text = "Planet kedua yaitu venus, Venus merupakan planet terdekat dari Bumi. Venus lebih panas dibanding Merkurius yang lebih dekat dengan Matahari. Hal ini terjadi karena Planet Venus memiliki lapisan atmosfer tebal yang dilapisi awan. Venus melakukan rotasi dengan arah yang berlawanan dengan rotasi planet-planet lainnya. Venus berotasi searah dengan jarum jam. Satu hari di Venus sama dengan 243 hari di Bumi.";
                }

                if (name == "merkurius")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/merkurius"); });
                    TextDescription.GetComponent <Text>().text = "Planet pertama adalah Merkurius, merkurius merupakan planet terdekat dari matahari yang  berjarak 58jt km, Merkurius sulit terlihat di langit pada malam hari jika dilihat dari Bumi. Markurius baru terlihat setelah Matahari terbenam, atau sebelum Matahari terbit. Keunikan dari Merkurius adalah melesat cepat mengelilingi Matahari, tetapi berotasi sangat lambat. Satu hari di Merkurius sama dengan 30 hari di Bumi.";
                }

                if (name == "mars")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/mars"); });
                    TextDescription.GetComponent <Text>().text = "Planet ke empat  adalah Mars. Mars dijuluki sebagai Planet Merah.  Planet ini disebut paling menyerupai Bumi. Satu hari di Mars sama dengan 24,6 jam di Bumi.  Ia juga memiliki kutub yang diselimuti es.  Suhu udara di Mars lebih dingin daripada suhu di Bumi, yaitu sekitar   - 63 derajat Celsius,  karena letak Mars yang lebih jauh dari Matahari dibanding Bumi.  Mars juga memiliki lapisan atmosfer, namun lebih tipis dibanding Bumi.";
                }

                if (name == "jupiter")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/jupiter"); });
                    TextDescription.GetComponent <Text>().text = "Planet kelima adalah planet Jupiter. Jupiter adalah planet terbesar di dalam tata surya. Suhu di planet ini pun sangat rendah, mencapai kurang lebih - 100 derajat Celsius. Planet Jupiter merupakan planet yang sebagian besar terdiri atas gas. Letak inti planetnya pun jauh di tengah. Planet ini memiliki bintik merah yang ternyata merupakan badai raksasa.";
                }

                if (name == "saturnus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/saturnus"); });
                    TextDescription.GetComponent <Text>().text = "Planet keenam dalam sistem tata surya adalah planet Saturnus. Saturnus terlihat memiliki cincin yang melingkari tubuhnya. Cincin tersebut terdiri atas lingkaran bebatuan, debu, dan es yang terperangkap dalam orbit mengelilingi planet tersebut.";
                }

                if (name == "uranus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/uranus"); });
                    TextDescription.GetComponent <Text>().text = "Planet Uranus merupakan planet ketujuh dalam sistem tata surya. Planet Uranus berputar miring karena porosnya yang hampir sejajar dengan orbitnya.  Suhu planet ini sangat dingin, yaitu sekitar minus 212 derajat Celsius.";
                }

                if (name == "neptunus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/neptunus"); });
                    TextDescription.GetComponent <Text>().text = "Planet yang berada di urutan paling jauh dari Matahari adalah planet Neptunus. Planet ini tampak berwarna biru gelap dari kejauhan dan tidak memiliki permukaan yang nyata. Sama halnya dengan Jupiter, Saturnus, dan Uranus, planet ini juga terdiri atas gumpalan gas.";
                }

                if (name == "matahari")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/matahari"); });
                    TextDescription.GetComponent <Text>().text = "Matahari adalah sebuah bintang raksasa yang sangat panas seperti bola pijar. Matahari merupakan pusat tata surya  yang dikelilingi benda langit lainnya. Suhu di permukaannya hampir 6000 derajat Celsius. Suhu inti Matahari mencapai 15.000.000 derajat Celsius. Percikan panasnya dapat membakar segala sesuatu hingga 97 kilometer.  Namun, Matahari hanya tergolong bintang sedang. Masih banyak bintang besar yang jauh lebih besar dan lebih panas dari matahari.";
                }
            }
        }
Beispiel #23
0
        // Update is called once per frame
        void Update()
        {
            ////Panelmain.gameObject.SetActive (false);
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            Panelmain.gameObject.SetActive(false);
            Panelmain2.gameObject.SetActive(false);

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                //				ButtonAction.gameObject.SetActive(true);
                //				TextDescription.gameObject.SetActive(true);
                //				PanelDescription.gameObject.SetActive(true);



                //If the target name was “zombie” then add listener to ButtonAction with location of the zombie sound (locate in Resources/sounds folder) and set text on TextDescription a description of the zombie
                if (name == "reff")
                {
                    //ButtonAction.GetComponent<Button>().onClick.AddListener(delegate { playSound("sounds/ZombieLongDeath"); });
                    //                  Vector3 targetPosition = TextTargetName.TransformPoint(new Vector3(0, 5, -10));
                    //                  transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, smoothTime);
                    TextTargetName.GetComponent <Text>().text = "";//Microwave Cost usage: 2AED/hour
                    Panelmain2.gameObject.SetActive(true);
                }
                if (name == "mic")
                {
                    //ButtonAction.GetComponent<Button>().onClick.AddListener(delegate { playSound("sounds/ZombieLongDeath"); });
                    //					Vector3 targetPosition = TextTargetName.TransformPoint(new Vector3(0, 5, -10));
                    //					transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, smoothTime);
                    TextTargetName.GetComponent <Text>().text = "";//Microwave Cost usage: 2AED/hour
                    Panelmain.gameObject.SetActive(true);
                }
                //				while (name == "IMG_20170510_123436_01") {
                //					//Panelmane().active = true;
                //					Panelmane.gameObject.SetActive (true);
                //
                //				}


                ////	if(name == "blenderr"){
                //ButtonAction.GetComponent<Button>().onClick.AddListener(delegate { playSound("sounds/ZombieLongDeath"); });
                //		Vector3 targetPosition = TextTargetName.TransformPoint(new Vector3(0, 5, -10));
                //					transform.position = Vector3.SmoothDamp(transform.position, targetPosition, ref velocity, 2);



                ////		TextTargetName.GetComponent<Text>().text = "Blender Cost usage: 0.5AED/hour";
                ///	}



                //If the target name was “unitychan” then add listener to ButtonAction with location of the unitychan sound (locate in Resources/sounds folder) and set text on TextDescription a description of the unitychan / robot

                //				if (name == "unitychan")
                //				{
                //					ButtonAction.GetComponent<Button>().onClick.AddListener(delegate { playSound("sounds/HelloBabyGirl"); });
                //					TextDescription.GetComponent<Text>().text = "A robot is a mechanical or virtual artificial agent, usually an electromechanical machine that is guided by a computer program or electronic circuitry, and thus a type of an embedded system.";
                //				}
            }
        }
Beispiel #24
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                string NewLine = System.Environment.NewLine;

                //Evertime the target found it will show “name of target” on the TextTargetName. Button, Description and Panel will visible (active)

                TextTargetName.GetComponent <Text>().text = name;
                ButtonAction.gameObject.SetActive(true);
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);

                // The Planet

                if (name == "earth")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/earthaudio"); });
                    TextDescription.GetComponent <Text>().text = " 3rd Planet in Solar System" + NewLine + "Distance from Sun : 150 Million KM" + NewLine + "The only Planet that inhabited by living things";
                }


                if (name == "mars")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/marsaudio"); });
                    TextDescription.GetComponent <Text>().text = "4th Planet in Solar System" + NewLine + "Distance from Sun: 241 Million KM" + NewLine + "Also known as the Red Planet";
                }

                if (name == "mercury")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/mercuryaudio"); });
                    TextDescription.GetComponent <Text>().text = "1st Planet in Solar System" + NewLine + "Distance from Sun : 39 million KM" + NewLine + "The Smallest Planet";
                }

                if (name == "venus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/venusaudio"); });
                    TextDescription.GetComponent <Text>().text = "2nd Planet in Solar System" + NewLine + "Distance from Sun: 108 Million KM" + NewLine + "The Hottest Planet";
                }

                if (name == "jupiter")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/jupiteraudio"); });
                    TextDescription.GetComponent <Text>().text = "5th Planet in Solar System" + NewLine + "Distance from Sun : 486 million KM" + NewLine + "The largest Planet";
                }

                if (name == "saturn")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/saturnaudio"); });
                    TextDescription.GetComponent <Text>().text = "6th Planet in Solar System" + NewLine + "Distance from Sun : 932 million KM" + NewLine + "Very popular with its ring";
                }

                if (name == "uranus")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/uranusaudio"); });
                    TextDescription.GetComponent <Text>().text = "7th Planet in Solar System" + NewLine + "Distance from Sun : 1779 million KM" + NewLine + "Contains Methane which makes it blue";
                }


                if (name == "neptune")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/neptuneaudio"); });
                    TextDescription.GetComponent <Text>().text = "8th Planet in Solar System" + NewLine + "Distance from Sun: 2782 million KM" + NewLine + " It takes 165 earth year to orbit the sun";
                }



                if (name == "moon")
                {
                    ButtonAction.GetComponent <Button>().onClick.AddListener(delegate { playSound("sounds/moonaudio"); });
                    TextDescription.GetComponent <Text>().text = "This is the Earth's moon" + "Distance from Earth: 348 400 KM";
                }
            }
        }
Beispiel #25
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();
                Debug.Log("Active image target:" + name + " -size: " + size.x + ", "
                          + size.y);
                //Evertime the target found it will show “name of target” on the
                //TextTargetName. Button, Description and Panel will visible (active)
                TextTargetName.GetComponent <Text>().text = name;
                TextDescription.gameObject.SetActive(true);
                PanelDescription.gameObject.SetActive(true);
                //If the target name was “zombie” then add listener to ButtonAction
                //with location of the zombie sound (locate in Resources/sounds folder)
                //and set text on TextDescription a description of the zombie
                if (name == "Napa")
                {
                    TextDescription.GetComponent <Text>().text = "What Napa® is and what it is used for?\n\n" +
                                                                 "Napa® (Paracetamol) is a fast acting and safe analgesic with marked antipyretic property." +
                                                                 "\n\nIt is recommended for the treatment of most painful and febrile conditions, such as headache, toothache, " +
                                                                 "backache, rheumatic and muscle pains, dysmenorrhoea, sore throat, and for relieving the fever, aches and pains" +
                                                                 " of colds and flu.\n\nHow to take Napa®\n\nTablet:\nAdults: 1-2 tablets 3-4 times daily\n\nSyrup/Suspension:\n" +
                                                                 "Adults: 4-8 Measuring spoonful 3-4 times daily;\nChildren: 6-12 years: 2- 4 measuring spoonful 3-4 times daily," +
                                                                 " 1-5 years: 1-2 Measuring spoonful 3-4 times daily, Up to 1 year: 1/2 -1 Measuring spoonful 3-4 times daily\n\n" +
                                                                 " How to store Napa®\nStore in a cool and dry place, away from light. Keep out of the reach and sight of children.";
                }
                else if (name == "HPRds")
                {
                    TextDescription.GetComponent <Text>().text = "What is Hpr-Ds?\n" +
                                                                 "Hpr-Ds Tablet is used for Pain during periods, Heavy bleeding during periods, Fever, " +
                                                                 "Migraine headache, Analgesic, Inflammation and other conditions.\n" +
                                                                 "Precautions & How to Use\n\n" +
                                                                 "Before using Hpr-Ds Tablet, inform your doctor about your current list of medications," +
                                                                 " over the counter products (e.g. vitamins, herbal supplements, etc.), allergies, pre-existing diseases," +
                                                                 " and current health conditions (e.g. pregnancy, upcoming surgery, etc.). Some health conditions may make you " +
                                                                 "more susceptible to the side-effects of the drug. Take as directed by your doctor or follow the direction printed" +
                                                                 " on the product insert. Dosage is based on your condition. Tell your doctor if your condition persists or worsens. " +
                                                                 "Important counseling points are listed below.\nHave renal and hepatic impairment\nTaking prescription or " +
                                                                 "nonprescription medicines";
                }
                else if (name == "NapaExtend")
                {
                    TextDescription.GetComponent <Text>().text = " What Napa Extend  is and what it is used for?\n\n" +
                                                                 "Paracetamol 665 mg Extended Release tablet is effective for the relief of persistent pain associated " +
                                                                 "with osteoarthritis and muscle aches and pains such as backache. Paracetamol 665 mg Extended Release tablet " +
                                                                 "also provides effective, temporary relief of pain and discomfort associated with headache," +
                                                                 " tension headache, period pain, toothache and pain after dental procedures, and cold & flu. Reduces fever." +
                                                                 " \n\n How to take Napa Extend\n\nParacetamol 665 mg Extended Release tablet are to be administered " +
                                                                 "orally, with or without food. Adults and children over 12 years. Two tablets, swallowed whole, every 6 to 8 hours" +
                                                                 " (maximum of 6 tablets in any 24 hours). " + "The tablets must not be crushed.";
                }
                else if (name == "Entacyd_Plus")
                {
                    TextDescription.GetComponent <Text>().text = " What is Entacyd Plus?\n\n" +
                                                                 "Entacyd Plus Suspension is used for Painful pressure, Acid indigestion, Stomach upset, Heartburn, Stomach acid," +
                                                                 " Increases water in the intestines and other conditions. Entacyd Plus Suspension may also be used for purposes not " +
                                                                 "listed in this medication guide.";
                }
            }
        }
Beispiel #26
0
        // Update is called once per frame
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            BalanceInquiry.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    BalanceInquiry.gameObject.SetActive(false);
                    Withdraw.gameObject.SetActive(false);
                    Deposit.gameObject.SetActive(false);
                    co = StartCoroutine(showBalance());
                }
            });

            Back.GetComponent <Button> ().onClick.AddListener(delegate {
                hideAmount();
            });

            Withdraw.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    state = false;
                    BalanceInquiry.gameObject.SetActive(false);
                    Withdraw.gameObject.SetActive(false);
                    Deposit.gameObject.SetActive(false);
                    Numbers.gameObject.SetActive(true);
                    click = true;
                }
            });

            Deposit.GetComponent <Button> ().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    state = true;
                    BalanceInquiry.gameObject.SetActive(false);
                    Withdraw.gameObject.SetActive(false);
                    Deposit.gameObject.SetActive(false);
                    Numbers.gameObject.SetActive(true);
                    click = true;
                }
            });

            Numbers.GetChild(0).GetComponent <Button>().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    Numbers.gameObject.SetActive(false);
                    co = (state) ? StartCoroutine(deposit(500)) : StartCoroutine(withdraw(500));
                }
            });

            Numbers.GetChild(1).GetComponent <Button>().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    Numbers.gameObject.SetActive(false);
                    co = (state) ? StartCoroutine(deposit(1000)) : StartCoroutine(withdraw(1000));
                }
            });

            Numbers.GetChild(2).GetComponent <Button>().onClick.AddListener(delegate {
                if (click)
                {
                    click = false;
                    Numbers.gameObject.SetActive(false);
                    co = (state) ? StartCoroutine(deposit(2000)) : StartCoroutine(withdraw(2000));
                }
            });

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);
            }
        }
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                if (i % 300 == 0)
                {
                    string      name = tb.TrackableName;
                    ImageTarget it   = tb.Trackable as ImageTarget;
                    Vector2     size = it.GetSize();

                    Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                    if (name == "Cl" && lastimagename == "Na")
                    {
                        MgCl2.SetActive(false);
                        CaCl2.SetActive(false);
                        KCl.SetActive(false);
                        HCl.SetActive(false);
                        Instantiate(NaCl, new Vector3(-75, -4, -10), Quaternion.identity);
                    }
                    else if (name == "Cl" && lastimagename == "Ca")
                    {
                        NaCl.SetActive(false);
                        MgCl2.SetActive(false);
                        KCl.SetActive(false);
                        HCl.SetActive(false);
                        yyy = -2.5f;
                        zzz = 68.3f;
                        Instantiate(CaCl2, new Vector3(-105, yyy, zzz), Quaternion.identity);
                    }
                    if (name == "Cl" && lastimagename == "Mg")
                    {
                        NaCl.SetActive(false);
                        CaCl2.SetActive(false);
                        KCl.SetActive(false);
                        HCl.SetActive(false);
                        yyy = -2.5f;
                        Instantiate(MgCl2, new Vector3(-105, yyy, 23), Quaternion.identity);
                    }
                    if (name == "Cl" && lastimagename == "K")
                    {
                        NaCl.SetActive(false);
                        CaCl2.SetActive(false);
                        MgCl2.SetActive(false);
                        HCl.SetActive(false);
                        yyy = -2.5f;
                        Instantiate(KCl, new Vector3(-75, yyy, 38), Quaternion.identity);
                    }
                    if (name == "Cl" && lastimagename == "H")
                    {
                        NaCl.SetActive(false);
                        CaCl2.SetActive(false);
                        MgCl2.SetActive(false);
                        KCl.SetActive(false);
                        yyy = -2.5f;
                        zzz = 53.5f;
                        Instantiate(HCl, new Vector3(-75, yyy, zzz), Quaternion.identity);
                    }
                    lastimagename = name;
                }
                i = i + 1;
                if (i >= 10000)
                {
                    i = 0;
                }
            }
        }
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                TextTargetNameMoon.GetComponent <Text>().text      = name;
                TextTargetNamePanelMoon.GetComponent <Text>().text = name;
                TextDescriptionMoon.gameObject.SetActive(true);
                PanelDescriptionMoon.gameObject.SetActive(true);


                if (name == "Mercury")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Layers of Mercury\n" +
                                                                     "\nMercury’s interior has a larger ratio of metallic core material to silicate rock material than the Earth. " +
                                                                     "Mercury also appears to have a solid layer of iron sulfide that lies at the top of the core. The presence of this solid layer places " +
                                                                     "important constraints on the temperatures within Mercury’s interior and may influence the generation of the planet’s magnetic field." +
                                                                     "\nScientists believe that the interior structure of Mercury includes a metallic core, an intermediate rocky layer, and a thin brittle crust.";
                }

                if (name == "Venus")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Layers of Venus \n" +
                                                                     "\nThe interior of Venus is probably similar to Earth's interior and probably has a partly molten metallic core, a rocky mantle, and a crust.\n";
                }

                if (name == "Earth")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Earth's moon \n" +
                                                                     "\nEarth has one moon. Earth's Moon is the only place beyond Earth where humans have set foot, so far. The Earth's moon radius is 1,079.6 miles and it is less than a third the width of Earth. " +
                                                                     "The moon is farther away from Earth than most people realize. The moon is an average of 238,855 miles away. The moon is rotating at the same rate that it revolves around Earth and is called synchronous rotation." +
                                                                     "\nLayers of Earth" +
                                                                     "\nThe layers of the earth based on chemical composition are Crust, Mantle, Inner Core and Outer Core.";
                }

                if (name == "Mars")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Mar's moons \n" +
                                                                     "\nMoon has two moons named Phobos and Delmos. " +
                                                                     "\nPhobos is the larger of Mars' two moons and is 17 x 14 x 11 miles in diameter. It orbits Mars three times a day. Phobos was discovered on Aug. 17, 1877 by Asaph Hall." +
                                                                     "Hall named Mars' moons for the mythological sons of Ares, the Greek counterpart of the Roman god, Mars. Phobos, whose name means fear or panic, is the brother of Deimos." +
                                                                     "\nDelmos is the smaller of Mars' two moons. Being only 9 by 7 by 6.8 miles in size (15 by 12 by 11 kilometers), Deimos whirls around Mars every 30 hours. " +
                                                                     "Deimos was discovered on Aug. 11, 1877 by Asaph Hall. " +
                                                                     "Hall named Mars' moons for the mythological sons of Ares, the Greek counterpart of the Roman god, Mars. Deimos, whose name means dread, is the brother of Phobos.";
                }

                if (name == "Jupiter")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Jupiter's Moons \n" +
                                                                     "\nJupiter has 79 Moons and 53 of them are named. The Galilean moons are the four largest moons named Jupiter—Io, Europa, Ganymede, and Callisto. " +
                                                                     "\n\nThe 53 named planets are:" +
                                                                     "\nAndrastea, Altne, Amalthea, Ananke, Aoede, Arche, Autonoe, Callirrhoe, Callisto, Carme, Carpo, Chaldene, Cyllene, Dla, Elara, Erlnome, Euantine, Eukelade, Euporie, Europa, Eurydome, " +
                                                                     "Ganymede, Harpalyke, Hegemone, Helike, Hermippe, Herse, Himalia, Io, Iocaste, Isonoe, Jupiter Ll, Jupiter LII, Kale, Kallichore, Kalyke, Kore, Leda, Lyslthea, Megaclite. ";
                }

                if (name == "Saturn")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Saturn's Moons \n " +
                                                                     "\nThe planet Saturn has 53 named moons, and another nine which are still being studied. Titan is the largest moon of Saturn." +
                                                                     "\nThe 53 named planets are: " +
                                                                     "\nAegaeon,Aegir,Albiorix,Anthe,Atlas,Bebhionn,Bergelmir,Bestla,Calipso,Daphnis,Dione,Erriapo,Enceladus,Epimetheus,Farbauti,Fenrir,Fornjot,Greip,Hati,Helene,Hyperion,Hyrrokkin,Ijiraq,Janus," +
                                                                     "Jarnsaxa,Kari,Kiviuq,Lapetus,Loge,Methone,Mimas,Mundilfari,Narvi,Paaliaq,Pallene,Pan,Pandora,Phoebe,Polydeuces,Prometheus,Rhea,Tarvos,Titan,Siarnaq,Skathi,Skoll,Surtur,Suttungr,Tarqeq," +
                                                                     "Telesto,Tethys,Thrymr,Ymir";
                }

                if (name == "Uranus")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Uranus's Moons \n" +
                                                                     "\nUranus has 27 moons. Uranus has five major moons: Miranda, Ariel, Umbriel, Titania, and Oberon." +
                                                                     "\nThe 27 moons are:" +
                                                                     "\nAriel, Belinda, Bianca, Caliban, Cressida, Cordelia, Cupid,Desdemona, Ferdinand, Francisco, Juliet, Mab, Margaret, Miranda, Oberon, Ophelia, Perdita, Portia, Prospero, Puck, Rosalind, Setebos, " +
                                                                     "Stephano, Sycorax, Titania, Trinculo, Umbriel.";
                }

                if (name == "Neptune")
                {
                    TextDescriptionMoon.GetComponent <Text>().text = "Neptune's Moons \n" +
                                                                     "\nNeptune has 14 moons. The largest moon is Triton which was discovered by William Lassell just seventeen days after Neptune was found." +
                                                                     "\nThe 14 moons are:" +
                                                                     "\nDespina,Galatea,Halimede,Larissa,Laomedeia,Naiad,Nereid,Neso,Proteus,Psamathe,Thalassa,Triton,S/2004 N1,Sao";
                }

                if (name == "Sun")
                {
                    TextDescriptionMoon.GetComponent <Text> ().text = "Sun \n" +
                                                                      "\nThe sun and its atmosphere are divided into several zones and layers. The solar interior is made up of the core, radiative zone and the convective zone. " +
                                                                      "\nThe solar atmosphere above that consists of the photosphere, chromosphere, a transition region and the corona. Beyond that is the solar wind, an outflow of gas from the corona." +
                                                                      "\nThe core extends from the sun's center to about a quarter of the way to its surface." +
                                                                      "\nThe radiative zone, which extends from the core to 70 percent of the way to the sun's surface, making up 32 percent of the sun's volume and 48 percent of its mass." +
                                                                      "\nThe convection zone reaches up to the sun's surface, and makes up 66 percent of the sun's volume but only a little more than 2 percent of its mass. ";
                }
            }
        }
Beispiel #29
0
        void Update()
        {
            StateManager sm = TrackerManager.Instance.GetStateManager();
            IEnumerable <TrackableBehaviour> tbs = sm.GetActiveTrackableBehaviours();

            foreach (TrackableBehaviour tb in tbs)
            {
                string      name = tb.TrackableName;
                ImageTarget it   = tb.Trackable as ImageTarget;
                Vector2     size = it.GetSize();

                Debug.Log("Active image target:" + name + "  -size: " + size.x + ", " + size.y);

                TextTargetNameFacts.GetComponent <Text>().text      = name;
                TextTargetNamePanelFacts.GetComponent <Text>().text = name;
                TextDescriptionFacts.gameObject.SetActive(true);
                PanelDescriptionFacts.gameObject.SetActive(true);


                if (name == "Mercury")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Mercury is named after the Roman deity Mercury, the messenger of the gods." +
                                                                      "\n2. Mercury has no moon." +
                                                                      "\n3. Only two spacecraft have ever visited Mercury. The Mariner 10 and MESSENGER." +
                                                                      "\n4. A day on the surface of Mercury lasts 176 Earth days and A year on Mercury takes 88 Earth days.";
                }

                if (name == "Venus")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Venus is named for the ancient Roman goddess of love anf beauty." +
                                                                      "\n2. Venus has no moon." +
                                                                      "\n3. Venus is the hottest planet in our Solar System." +
                                                                      "\n4. Venus is often called the Earth's sister planet." +
                                                                      "\n5. Venus has the longest rotation period of any planet int he Solar System and rotates in the opposite direction to most other planets.";
                }

                if (name == "Earth")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Earth is the only planet not named after a god." +
                                                                      "\n2. There is only natural satellite of the planet Earth." +
                                                                      "\n3. The Earth was once believed to be the centre of the universe. " +
                                                                      "\n4. There is only one natural satellite of the planet Earth." +
                                                                      "\n5. The Earth is the densest planet in the Solar System.";
                }

                if (name == "Mars")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Befitting the red planet's bloody color, the Romans named Mars after their god of war, Ares." +
                                                                      "\n2. Only 18 missions to Mars have been successful." +
                                                                      "\n3. Mars is home to the tallest mountain in the solar system." +
                                                                      "\n4. Mars was once believed to be home to intelligent life." +
                                                                      "\n5. Pieces of Mars have been found on Earth." +
                                                                      "\n6. MArs has the largest dust storms in the solar system.";
                }

                if (name == "Jupiter")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Jupiter was named after the king of gods in Roman mythology. In a similar manner, the ancient Greeks named the planet after Zeus, the king of the Greek pantheon." +
                                                                      "\n2. Jupiter has a unique cloud features." +
                                                                      "\n3. Eight spcaecraft have visited Jupiter. The Pioneer 10 and 11, Voyager 1 and 2, Galileo, Cassini, Ulysses, and New Horizons missions. " +
                                                                      "\n4. The Great Red spot is a huge storm on Jupiter. ";
                }

                if (name == "Saturn")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Saturn is named after a character in Roman mythology. Saturn is named after the god Saturns, the god of agriculture and harvest." +
                                                                      "\n2. Saturn has oval-shaped storms similar to Jupiter." +
                                                                      "\n3. Saturn is made mostly of hydrogen." +
                                                                      "\n4. Saturn has the most extensive rings in the solar system. " +
                                                                      "\n5. Saturn is the flattest planet. " +
                                                                      "\n6. Four spacecraft have visited Saturn. The Pioneer 11, Voyager 1 and 2, and the Cassini-Hyugens missions.";
                }

                if (name == "Uranus")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. The name Uranus was first proposed by German astronomer Johann Elert Bode." +
                                                                      "\n2. Uranus is often referred to as an ice giant planet." +
                                                                      "\n3. Uranus hits the coldest temperatures of any planet. " +
                                                                      "\n4. Uranus has two sets of very thin dark coloured rings." +
                                                                      "\n5. Only one spacecraft has flown by Uranus. It is the Voyager 2." +
                                                                      "\n6. It has 27 known moons, all of which are named after characters from the works of William Shakespeare and Alexander Pope.";
                }

                if (name == "Neptune")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. In Roman Mythology, Neptune was the god of the sea." +
                                                                      "\n2. Neptune is the smallest of the ice giants. " +
                                                                      "\n3. Neptune has a very active climate. " +
                                                                      "\n4. Neptune has a very thin collection of rings." +
                                                                      "\n5. Only one spacecraft has flown by Neptune. It is the Voyager 2 spacecraft.";
                }

                if (name == "Pluto")
                {
                    TextDescriptionFacts.GetComponent <Text>().text = "Did you know? \n" +
                                                                      "\n1. Pluto is named after the greek god of the underworld. " +
                                                                      "\n2. Pluto was reclassified from a planet to a dwarf planet in 2006." +
                                                                      "\n3. Pluto has been visited by one spacecraft. It is the New Horizons spacecraft." +
                                                                      "\n4. Pluto is the largest dwarf planet." +
                                                                      "\n5. Pluto is one third water. " +
                                                                      "\n6. Pluto has a eccentric and inclined orbit.";
                }

                if (name == "Sun")
                {
                    TextDescriptionFacts.GetComponent <Text> ().text = "Did you know? \n" +
                                                                       "\n1. Sun was named after the God of Enlightenment, Apollo." +
                                                                       "\n2. As its centre, the Sun reaches temperatures of 15 million degrees C." +
                                                                       "\n3. The Sun is all the colours mized together, this appears white to our eyes." +
                                                                       "\n4. One million Earths could fit inside the Sun." +
                                                                       "\n5. The Sun is an almost perfect square.";
                }
            }
        }