예제 #1
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.";
                }
            }
        }
        internal override bool InitializeTarget(Trackable trackable, bool applyTargetScaleToBehaviour)
        {
            base.InitializeTarget(trackable, applyTargetScaleToBehaviour);
            ImageTarget imageTarget = (ImageTarget)trackable;

            if (imageTarget == null)
            {
                return(false);
            }
            this.mTrackable       = (this.mImageTarget = imageTarget);
            this.mTrackableName   = trackable.Name;
            this.mImageTargetType = imageTarget.ImageTargetType;
            if (imageTarget is ImageTargetImpl)
            {
                this.mDataSetPath = ((ImageTargetImpl)imageTarget).DataSet.Path;
            }
            if (applyTargetScaleToBehaviour || imageTarget.ImageTargetType != ImageTargetType.PREDEFINED)
            {
                Vector3 size = imageTarget.GetSize();
                float   num  = Mathf.Max(size.x, size.y);
                base.transform.localScale = new Vector3(num, num, num);
                base.CorrectScale();
                this.mAspectRatio = size.y / size.x;
            }
            this.mVirtualButtonBehaviours = new Dictionary <int, VirtualButtonAbstractBehaviour>();
            if (imageTarget.ImageTargetType == ImageTargetType.PREDEFINED)
            {
                Vector2 size2 = this.GetSize();
                imageTarget.SetSize(size2);
            }
            if (this.mExtendedTracking)
            {
                this.mImageTarget.StartExtendedTracking();
            }
            return(true);
        }
예제 #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;
                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.";
                }
            }
        }
예제 #4
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";
                }
            }
        }
예제 #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);

                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";
                }
            }
        }
예제 #6
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. ";
                }
            }
        }
예제 #7
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.";
                }
            }
        }
예제 #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);

                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 = ".";
                }
            }
        }
예제 #9
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.";
                }
            }
        }
예제 #10
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";
                }
            }
        }
예제 #11
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.";
                }
            }
        }
예제 #12
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.";
                }
            }
        }
예제 #13
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);
            }
        }
예제 #14
0
    void IEditorImageTargetBehaviour.InitializeImageTarget(ImageTarget imageTarget)
    {
        mTrackable = mImageTarget = imageTarget;
        mVirtualButtonBehaviours = new Dictionary<int, VirtualButtonBehaviour>();

        // do not change the aspect ratio of user defined targets, these are set by the algorithm internally
        if (imageTarget.ImageTargetType == ImageTargetType.PREDEFINED)
        {
            // Handle any changes to the image target in the scene
            // that are not reflected in the config file
            Vector2 imgTargetUnitySize = GetSize();

            imageTarget.SetSize(imgTargetUnitySize);
        }
        else // instead, set the aspect of the unity object to the value of the user defined target
        {
            Vector2 udtSize = imageTarget.GetSize();

            // set the size of the target to the value returned from cloud reco:
            transform.localScale =
                new Vector3(udtSize.x,
                            udtSize.x,
                            udtSize.x);

            IEditorImageTargetBehaviour editorThis = this;
            editorThis.CorrectScale();

            editorThis.SetAspectRatio(udtSize.y / udtSize.x);
        }
    }
        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;
                }
            }
        }
예제 #16
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);
            }
        }
예제 #17
0
    public void OnNewSearchResult(TargetFinder.TargetSearchResult targetSearchResult)
    {
        UnityEngine.Debug.Log("found");
        GameObject gameObject = UnityEngine.Object.Instantiate(ImageTargetTemplate.gameObject);

        MainPlayer = gameObject.transform.GetChild(0).gameObject;
        GameObject gameObject2 = null;

        if (gameObject2 != null)
        {
            gameObject2.transform.SetParent(gameObject.transform);
        }
        if ((bool)ImageTargetTemplate)
        {
            ImageTargetBehaviour imageTargetBehaviour = (ImageTargetBehaviour)TrackerManager.Instance.GetTracker <ObjectTracker>().GetTargetFinder <ImageTargetFinder>().EnableTracking(targetSearchResult, gameObject);
        }
        TargetFinder.CloudRecoSearchResult cloudRecoSearchResult = (TargetFinder.CloudRecoSearchResult)targetSearchResult;
        mTargetMetadata = cloudRecoSearchResult.MetaData;
        if (Directory.Exists(Path.Combine(Application.persistentDataPath, "YourUnzippedVideos")))
        {
            url = Path.Combine(Application.persistentDataPath, "YourUnzippedVideos");
            url = Path.Combine(url, mTargetMetadata);
        }
        txt.text = url;
        if (File.Exists(url))
        {
            float rotation = NativeGallery.GetVideoProperties(url).rotation;
            txt.text = rotation.ToString();
            ImageTarget imageTarget = gameObject.GetComponent <ImageTargetBehaviour>().ImageTarget;
            newScale1 = imageTarget.GetSize().x / imageTarget.GetSize().y;

            MainPlayer.transform.localScale = new Vector3(newScale1, 1f, newScale1);

            if (newScale1 > 1f && rotation == 0f)
            {
                float y = 1f / newScale1;
                MainPlayer.transform.localScale = new Vector3(1f, y, 1f);
            }
            if (newScale1 > 1f && rotation == 90f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -90f));
                float y = 1f / newScale1;
                MainPlayer.transform.localScale = new Vector3(y, 1f, 1f);
            }
            if (newScale1 > 1f && rotation == 180f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -180f));
                float y = 1f / newScale1;
                MainPlayer.transform.localScale = new Vector3(1f, y, 1f);
            }
            if (newScale1 > 1f && rotation == 270f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -270f));
                float y = 1f / newScale1;
                MainPlayer.transform.localScale = new Vector3(y, 1f, 1f);
            }
            if (newScale1 > 1f && rotation == 360f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -360f));
                float y = 1f / newScale1;
                MainPlayer.transform.localScale = new Vector3(1f, y, 1f);
            }
            if (newScale1 < 1f)
            {
                MainPlayer.transform.localScale = new Vector3(newScale1, 1f, 1f);
            }
            if (newScale1 < 1f && rotation == 180f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -180f));
                MainPlayer.transform.localScale = new Vector3(newScale1, 1f, 1f);
            }
            if (newScale1 < 1f && rotation == 90f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -90f));
                MainPlayer.transform.localScale = new Vector3(1f, newScale1, 1f);
            }
            if (newScale1 < 1f && rotation == 270f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -270f));
                MainPlayer.transform.localScale = new Vector3(1f, newScale1, 1f);
            }
            if (newScale1 < 1f && rotation == 360f)
            {
                MainPlayer.transform.Rotate(new Vector3(0f, 0f, -360f));
                MainPlayer.transform.localScale = new Vector3(newScale1, 1f, 1f);
            }
            txt2.text = MainPlayer.transform.localScale.ToString();
            MainPlayer.GetComponent <VideoPlayer>().url = url;
        }
        else
        {
            MainPlayer.transform.localScale = new Vector3(0f, 0f, 0f);
        }
    }
예제 #18
0
    private ImageTargetBehaviour CreateImageTargetBehaviour(ImageTarget imageTarget)
    {
        GameObject imageTargetObject = new GameObject();
        ImageTargetBehaviour newITB =
            imageTargetObject.AddComponent<ImageTargetBehaviour>();

        IEditorImageTargetBehaviour newEditorITB = newITB;

        Debug.Log("Creating Image Target with values: " +
                  "\n ID:           " + imageTarget.ID +
                  "\n Name:         " + imageTarget.Name +
                  "\n Path:         " + newEditorITB.DataSetPath +
                  "\n Size:         " + imageTarget.GetSize().x + "x" + imageTarget.GetSize().y);

        // Set Image Target attributes.
        newEditorITB.SetNameForTrackable(imageTarget.Name);
        newEditorITB.SetDataSetPath(newEditorITB.DataSetPath);
        newEditorITB.transform.localScale = new Vector3(imageTarget.GetSize().x, 1.0f, imageTarget.GetSize().y);
        newEditorITB.CorrectScale();
        newEditorITB.SetAspectRatio(imageTarget.GetSize()[1] / imageTarget.GetSize()[0]);
        newEditorITB.InitializeImageTarget(imageTarget);

        return newITB;
    }
예제 #19
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.";
                //				}
            }
        }