Example #1
0
    void Awake()
    {
        playerInstance = GameObject.Find("Player").GetComponent <Player>();

        gameControlInstance       = gc.GetComponent <GameControl> ();
        gameControlGUIInstance    = gc.GetComponent <GameControlGUI> ();
        shopControlInstance       = gc.GetComponent <ShopControl> ();
        shopControlGUIInstance    = gc.GetComponent <ShopControlGUI> ();
        clickControlInstance      = gc.GetComponent <ClickControl> ();
        gridControlInstance       = gc.GetComponent <GridControl>();
        optionControlInstance     = gc.GetComponent <OptionControl>();
        dragControlInstance       = gc.GetComponent <DragControl>();
        eventGUIInstance          = gc.GetComponent <EventGUI>();
        enemyLibraryInstance      = gc.GetComponent <EnemyLibrary>();
        cardLibraryInstance       = gc.GetComponent <CardLibrary>();
        goalLibraryInstance       = gc.GetComponent <GoalLibrary>();
        guiStyleLibraryInstance   = gc.GetComponent <GUIStyleLibrary>();
        mainMenuInstance          = gc.GetComponent <MainMenu>();
        encyclopediaMenuInstance  = gc.GetComponent <EncyclopediaMenu>();
        godChoiceMenuInstance     = gc.GetComponent <GodChoiceMenu>();
        customizeMenuInstance     = gc.GetComponent <CustomizeMenu>();
        gridCursorControlInstance = gc.GetComponent <GridCursorControl>();
        menuControlInstance       = gc.GetComponent <MenuControl>();
        tutorialInstance          = gc.GetComponent <Tutorial>();
        deckAnimateInstance       = deck.GetComponent <DeckAnimate>();

        shopAndGoalParentCanvasInstance = goalandshopparent
                                          .GetComponent <ShopAndGoalParentCanvas>();
        shopGridCanvasInstance = shopgrid
                                 .GetComponent <ShopGridCanvas>();
        gridCursorControlGUIInstance = gridcursorcontrolgui
                                       .GetComponent <GridCursorControlGUI>();
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        allUnitsOnMap = new List <BaseUnitAI>();
        selectedUnits = new List <BaseUnitAI>();

        UnitMouseOver = this.GetComponent <ClickControl>();
    }
Example #3
0
 // Start is called before the first frame update
 void Start()
 {
     clickControl = gameObject.GetComponent <ClickControl>();
     audioSource  = gameObject.GetComponent <AudioSource>();
     if (OyunBirObject != null)
     {
         oyunBir = OyunBirObject.GetComponent <OyunBir>();
     }
     if (OyunIkiObject != null)
     {
         oyunIki = OyunIkiObject.GetComponent <OyunIki>();
     }
     if (OyunUcObject != null)
     {
         oyunUc = OyunUcObject.GetComponent <OyunUc>();
     }
     if (OyunDortObject != null)
     {
         oyunDort = OyunDortObject.GetComponent <OyunDort>();
     }
     if (OyunBesObject != null)
     {
         oyunBes = OyunBesObject.GetComponent <OyunBes>();
     }
     if (OyunAltiObject != null)
     {
         oyunAlti = OyunAltiObject.GetComponent <OyunAlti>();
     }
 }
Example #4
0
 public static void Initialize(GameControl gc, Player pl)
 {
     gameControl     = gc;
     shopControl     = gc.gameObject.GetComponent <ShopControl>();
     clickControl    = gc.gameObject.GetComponent <ClickControl>();
     gridControl     = gc.gameObject.GetComponent <GridControl>();
     shopControlGUI  = gc.gameObject.GetComponent <ShopControlGUI>();
     obstacleLibrary = gc.gameObject.GetComponent <ObstacleLibrary>();
     enemyLibrary    = gc.gameObject.GetComponent <EnemyLibrary>();
     player          = pl;
 }
Example #5
0
 // Update is called once per frame
 void Update()
 {
     if (GameStates.isGamePaused == false)
     {
         if (Input.GetMouseButtonDown(0))
         {
             EnemyMove enemy = ClickControl.GetTransformOnClick(_lm).GetComponent <EnemyMove>();
             if (enemy != null)
             {
                 if (Vector2.Distance(enemy.transform.position, transform.position) <= transform.Find("RangeCircle").localScale.x / 2)
                 {
                     if (!enemy.isControlledByPlayer)
                     {
                         ScoreKeeper.robotsControlled++;
                         ScoreKeeper.score += 20;
                     }
                     enemy.isControlledByPlayer = true;
                 }
             }
         }
     }
 }
Example #6
0
    void Update()
    {
        if (bilinensayisi < KelimeSayisi)
        {
            if (clickObject.GetComponent <ClickControl>() != null)
            {
                clickControl = clickObject.GetComponent <ClickControl>();
            }

            Ray        ray = camera.ScreenPointToRay(Input.mousePosition);
            RaycastHit hitInfo;
            if (Physics.Raycast(ray, out hitInfo))
            {
                if (Input.GetMouseButtonDown(0) && hitInfo.transform.gameObject.name.Contains("Kart"))
                {
                    SecilenKelime = new List <GameObject>();
                    Control[0]    = hitInfo.transform.gameObject;
                    if (Control[0].name.Length == 8)
                    {
                        cardX = Convert.ToInt32(Control[0].name.Substring(5, 1));
                        cardZ = Convert.ToInt32(Control[0].name.Substring(7, 1));
                    }
                    if (Control[0].name.Length == 9)
                    {
                        if (Control[0].name.Substring(7, 1) != "_")
                        {
                            cardX = Convert.ToInt32(Control[0].name.Substring(5, 1));
                            cardZ = Convert.ToInt32(Control[0].name.Substring(7, 2));
                        }
                        else
                        {
                            cardX = Convert.ToInt32(Control[0].name.Substring(5, 2));
                            cardZ = Convert.ToInt32(Control[0].name.Substring(8, 1));
                        }
                    }
                    if (Control[0].name.Length == 10)
                    {
                        cardX = Convert.ToInt32(Control[0].name.Substring(5, 2));
                        cardZ = Convert.ToInt32(Control[0].name.Substring(8, 2));
                    }
                }
                if (Input.GetMouseButton(0))
                {
                    if (hitInfo.transform.gameObject != Control[0])
                    {
                        if (hitInfo.transform.gameObject != null && hitInfo.transform.gameObject.transform.position.z == Control[0].transform.position.z)
                        {
                            yonler = Yonler.Yatay;
                            SecilenKelime.Add(Control[0]);
                        }
                        if (hitInfo.transform.gameObject != null && hitInfo.transform.gameObject.transform.position.x == Control[0].transform.position.x)
                        {
                            yonler = Yonler.Dikey;
                            SecilenKelime.Add(Control[0]);
                        }
                        if (hitInfo.transform.gameObject != null && Math.Abs(hitInfo.transform.gameObject.transform.position.z - Control[0].transform.position.z) == Math.Abs(hitInfo.transform.gameObject.transform.position.x - Control[0].transform.position.x))
                        {
                            yonler = Yonler.Capraz;
                            SecilenKelime.Add(Control[0]);
                        }
                        yonAtandi = true;
                    }
                    if (yonAtandi == true)
                    {
                        if (yonler == Yonler.Yatay)
                        {
                            RaycastHit hitInfoNew;
                            Vector3    position = new Vector3(hitInfo.transform.position.x, Control[0].transform.position.y, Control[0].transform.position.z - 1);
                            if (Physics.Raycast(position, transform.TransformDirection(Vector3.forward), out hitInfoNew))
                            {
                                SecilenKelime.Add(hitInfoNew.transform.gameObject);
                            }
                        }
                        if (yonler == Yonler.Dikey)
                        {
                            RaycastHit hitInfoNew;
                            Vector3    position = new Vector3(Control[0].transform.position.x, Control[0].transform.position.y, hitInfo.transform.position.z - 1);
                            if (Physics.Raycast(position, transform.TransformDirection(Vector3.forward), out hitInfoNew))
                            {
                                SecilenKelime.Add(hitInfoNew.transform.gameObject);
                            }
                        }
                        if (yonler == Yonler.Capraz)
                        {
                            RaycastHit hitInfoNew;
                            Vector3    position = new Vector3(hitInfo.transform.position.x, Control[0].transform.position.y, hitInfo.transform.position.z - 1);
                            if (Physics.Raycast(position, transform.TransformDirection(Vector3.forward), out hitInfoNew))
                            {
                                if (Math.Abs(Control[0].transform.position.x - hitInfoNew.transform.gameObject.transform.position.x) == Math.Abs(Control[0].transform.position.z - hitInfoNew.transform.gameObject.transform.position.z))
                                {
                                    SecilenKelime.Add(hitInfoNew.transform.gameObject);
                                }
                            }
                        }
                    }
                }
                if (Input.GetMouseButtonUp(0) && hitInfo.transform.gameObject.name.Contains("Kart"))
                {
                    Control[1]     = hitInfo.transform.gameObject;
                    ensturman      = null;
                    kelimeHarfleri = new List <GameObject>();
                    KontrolEtme(Control, kelimeHarfleri);
                    yonAtandi = false;
                }
            }
        }
        if (bilinensayisi == KelimeSayisi)
        {
            oyunKazanildi = true;
        }
    }
Example #7
0
    void Update()
    {
        if (cevaplananYanlisSoruSayisi < yanlisBilmeHakki)
        {
            if (sonrakineGecButton == false)
            {
                if (cevaplananSoruSayisi < 41 && sayi < options.Count() - 1)
                {
                    CardQuestion();
                    selectedMusicalInstruments = new List <string>();
                    trueOption = new System.Random().Next(options.Count());
                    for (int i = 0; i < options.Count; i++)
                    {
                        if (i == trueOption)
                        {
                            options[i].Instrument = Question;
                            selectedMusicalInstruments.Add(Question);
                            sayi++;
                        }
                    }

                    foreach (var item in options)
                    {
                        if (item.Id != trueOption)
                        {
                            item.Instrument = InsturmentSelect();
                            sayi++;
                        }
                    }

                    for (int i = 0; i < options.Count; i++)
                    {
                        GameObject.Find("SecenekCard" + i).transform.GetChild(6).GetChild(0).GetComponent <Text>().text = options[i].Instrument;
                        foreach (var image in Images)
                        {
                            if (image.name == options[i].Instrument)
                            {
                                GameObject.Find("SecenekCard" + i).transform.GetChild(6).GetChild(1).GetComponent <Image>().sprite = image;
                            }
                        }
                    }
                }

                if (clickObject.GetComponent <ClickControl>() != null)
                {
                    clickControl = clickObject.GetComponent <ClickControl>();
                }
                if (clickControl.SelectedObject != null && clickControl.SelectedObject.name == "SoruCard")
                {
                    yenidenDinle = true;
                }
                var yanlis = false;
                if (clickControl.SelectedObject != null && clickControl.SelectedObject.name.Contains("Secenek"))
                {
                    foreach (var item in options)
                    {
                        if (clickControl.SelectedObject != null && clickControl.SelectedObject.transform.GetChild(6).GetChild(0).GetComponent <Text>().text == Question /*item.Id == Convert.ToInt32(clickControl.SelectedObject.name.Substring(11, 1)) && item.Id == trueOption*/)
                        {
                            DogruMuzikCal = true;
                            sayi          = 0;
                            cevaplananDogruSoruSayisi++;
                            yanlis                      = false;
                            trueMi                      = true;
                            sonrakineGecButton          = true;
                            clickControl.SelectedObject = null;
                            break;
                        }
                        else
                        {
                            yanlis = true;
                        }
                    }
                    if (yanlis == true)
                    {
                        YanlisMuzikCal = true;
                        sayi           = 0;
                        cevaplananYanlisSoruSayisi++;
                        YanlisSayisiCanvas.transform.GetChild(0).GetChild(0).GetComponent <Text>().text = "Yanlýþ Sayýsý " + cevaplananYanlisSoruSayisi + "/" + yanlisBilmeHakki;
                        sonrakineGecButton          = true;
                        yanlis                      = false;
                        clickControl.SelectedObject = null;
                    }
                    cevaplananSoruSayisi++;
                }
            }
            else
            {
                if (clickObject.GetComponent <ClickControl>() != null)
                {
                    clickControl = clickObject.GetComponent <ClickControl>();
                    clickControl.SelectedObject = null;
                }
            }
        }
        else
        {
            oyunKaybedildi = true;
        }
        if (cevaplananSoruSayisi == 41)
        {
            oyunKazanildi = true;
        }
    }
Example #8
0
    void Update()
    {
        if (clickObject.GetComponent <ClickControl>() != null)
        {
            clickControl = clickObject.GetComponent <ClickControl>();
        }

        if (clickControl.SelectedObject != null && clickControl.SelectedObject.name.Contains("Bilgi"))
        {
            var name1     = name.GetComponent <Text>();
            var turu1     = turu.GetComponent <Text>();
            var aciklama1 = aciklama.GetComponent <Text>();

            foreach (var item in bilgiler)
            {
                if (item.Name == clickControl.SelectedObject.name.Substring(5, clickControl.SelectedObject.name.Length - 5).ToUpper())
                {
                    name1.text     = item.Name;
                    turu1.text     = "Türü: " + item.Turu;
                    aciklama1.text = item.Aciklama;
                    canvas.SetActive(true);
                }
            }
        }

        if (kacDogruOldu < kacDogruOlmali)
        {
            time         += Time.deltaTime;
            timeText.text = "" + (int)time;

            if (clickControl.SelectedObject != null && clickControl.SelectedObject.name.Contains("Card") && Control[0] == null && Control[1] == null && Control[0] != clickControl.SelectedObject.name && eskiyeDon == false && tasinacak != true)
            {
                Control[0]   = clickControl.SelectedObject.name;
                donecek1     = true;
                donecekObje1 = clickControl.SelectedObject;
            }

            if (clickControl.SelectedObject != null && clickControl.SelectedObject.name.Contains("Card") && Control[0] != null && Control[1] == null && Control[0] != clickControl.SelectedObject.name && eskiyeDon == false && tasinacak != true)
            {
                Control[1]   = clickControl.SelectedObject.name;
                donecek2     = true;
                donecekObje2 = clickControl.SelectedObject;
            }

            if (eskiyeDon == true)
            {
                donecekObje1.transform.rotation = Quaternion.Lerp(donecekObje1.transform.rotation, Quaternion.Euler(0, -90, 0), Time.deltaTime * 8f);
                donecekObje2.transform.rotation = Quaternion.Lerp(donecekObje2.transform.rotation, Quaternion.Euler(0, -90, 0), Time.deltaTime * 8f);

                if (donecekObje1.transform.rotation.z < Quaternion.Euler(-130, -90, 0).z || donecekObje2.transform.rotation.z < Quaternion.Euler(-130, -90, 0).z)
                {
                    donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(donecekObje1.transform.position.x, 1, donecekObje1.transform.position.z), Time.deltaTime * 10f);
                    donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(donecekObje2.transform.position.x, 1, donecekObje2.transform.position.z), Time.deltaTime * 10f);
                }
                else
                {
                    donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(donecekObje1.transform.position.x, 0, donecekObje1.transform.position.z), Time.deltaTime * 1f);
                    donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(donecekObje2.transform.position.x, 0, donecekObje2.transform.position.z), Time.deltaTime * 1f);
                }
                if ((donecekObje1.transform.rotation == Quaternion.Euler(0, -90, 0) && donecekObje1.transform.position == new Vector3(donecekObje1.transform.position.x, 0, donecekObje1.transform.position.z)) && (donecekObje2.transform.rotation == Quaternion.Euler(0, -90, 0) && donecekObje2.transform.position == new Vector3(donecekObje2.transform.position.x, 0, donecekObje2.transform.position.z)))
                {
                    eskiyeDon  = false;
                    Control[0] = null;
                    Control[1] = null;
                }
            }

            if (donecek1 == true && eskiyeDon == false && yedekDonecekObje1 == null)
            {
                donecekObje1.transform.rotation = Quaternion.Lerp(donecekObje1.transform.rotation, Quaternion.Euler(180, -90, 0), Time.deltaTime * 2.5f);
                if (donecekObje1.transform.rotation.z > Quaternion.Euler(-130, -90, 0).z)
                {
                    donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(donecekObje1.transform.position.x, 1, donecekObje1.transform.position.z), Time.deltaTime * 10f);
                }
                else
                {
                    donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(donecekObje1.transform.position.x, 0, donecekObje1.transform.position.z), Time.deltaTime * 1f);
                }

                if (donecekObje1.transform.rotation == Quaternion.Euler(-180, -90, 0) && donecekObje1.transform.position == new Vector3(donecekObje1.transform.position.x, 0, donecekObje1.transform.position.z))
                {
                    donecek1 = false;
                }
            }

            if (donecek2 == true && eskiyeDon == false)
            {
                donecekObje2.transform.rotation = Quaternion.Lerp(donecekObje2.transform.rotation, Quaternion.Euler(180, -90, 0), Time.deltaTime * 2.5f);
                if (donecekObje2.transform.rotation.z > Quaternion.Euler(-130, -90, 0).z)
                {
                    donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(donecekObje2.transform.position.x, 1, donecekObje2.transform.position.z), Time.deltaTime * 10f);
                }
                else
                {
                    donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(donecekObje2.transform.position.x, 0, donecekObje2.transform.position.z), Time.deltaTime * 1f);
                }
                if (donecekObje2.transform.rotation == Quaternion.Euler(-180, -90, 0) && donecekObje2.transform.position == new Vector3(donecekObje2.transform.position.x, 0, donecekObje2.transform.position.z))
                {
                    donecek2 = false;
                    if (Control[0].Substring(6, Control[0].Length - 6) == Control[1].Substring(6, Control[1].Length - 6))
                    {
                        tasinacak = true;
                        theRight.Add(Control[0]);
                    }
                    else
                    {
                        yanlisEslestirme = true;
                        eskiyeDon        = true;
                    }
                }
            }

            if (tasinacak == true && donecek2 == false && Control[0] != null && Control[1] != null)
            {
                for (int i = 0; i < theRight.Count; i++)
                {
                    if (theRight[i] == Control[0])
                    {
                        if (donecekObje1.transform.position != transforms[i].position || (donecekObje2 != null && donecekObje2.transform.position != transforms[i].position))
                        {
                            if (donecekObje1.transform.position.x <= (transforms[i].position.x - donecekObje1.transform.position.x) / 2 || donecekObje2.transform.position.x <= (transforms[i].position.x - donecekObje2.transform.position.x) / 2)
                            {
                                donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(transforms[i].position.x, 4, transforms[i].position.z), Time.deltaTime * 5f);
                                donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(transforms[i].position.x, 4, transforms[i].position.z), Time.deltaTime * 5f);
                            }
                            else
                            {
                                donecekObje1.transform.position = Vector3.MoveTowards(donecekObje1.transform.position, new Vector3(transforms[i].position.x, 0, transforms[i].position.z), Time.deltaTime * 5f);
                                donecekObje2.transform.position = Vector3.MoveTowards(donecekObje2.transform.position, new Vector3(transforms[i].position.x, 0, transforms[i].position.z), Time.deltaTime * 5f);
                            }
                        }
                        else
                        {
                            Destroy(donecekObje2);
                            donecekObje1.name = "Bilgi" + Control[0].Substring(6, Control[0].Length - 6);

                            datalar = gameObject.GetComponent <Datalar>();
                            foreach (var item in datalar.explanations)
                            {
                                if (item.Name == donecekObje1.name.Substring(5, donecekObje1.name.Length - 5).ToUpper())
                                {
                                    var bilgis = new Bilgiler()
                                    {
                                        Id       = item.Id,
                                        Name     = item.Name,
                                        Turu     = item.Turu,
                                        Aciklama = item.Aciklama
                                    };
                                    bilgiler.Add(bilgis);
                                }
                            }

                            Control[0] = null;
                            Control[1] = null;
                            kacDogruOldu++;
                            tasinacak = false;
                            break;
                        }
                    }
                }
            }
        }
        else
        {
            oyunKazanildi = true;
        }
    }
        // Use this for initialization
        void Start () {
            allUnitsOnMap = new List<BaseUnitAI>();
            selectedUnits = new List<BaseUnitAI>();

            UnitMouseOver = this.GetComponent<ClickControl>();
        }
Example #10
0
    void Update()
    {
        if ((menus.gameStop == false || DogruBilmeSayisiYedek < DogruBilmeSayisi) && yanlisBilmeHakkiYedek > 0)
        {
            if (clickObject.GetComponent <ClickControl>().SelectedObject != null && kelimeSecildi == true && clickObject.GetComponent <ClickControl>().SelectedObject.name.Contains("CardIsim"))
            {
                clickControl = clickObject.GetComponent <ClickControl>();
                foreach (var item in CardLetters)
                {
                    if (clickControl.SelectedObject != null && item.Letter.ToString().Equals(clickControl.SelectedObject.name.Substring(8, 1).ToString()))
                    {
                        item.Card.transform.GetChild(1).GetChild(0).GetComponent <Text>().text = clickControl.SelectedObject.name.Substring(8, 1).ToString();
                    }
                }
                if (cikanHarfler.Count == 0)
                {
                    cikanHarfler.Add(clickControl.SelectedObject);
                }
                else
                {
                    foreach (var item1 in cikanHarfler)
                    {
                        if (clickControl.SelectedObject.name.Substring(8, 1).ToString() == item1.transform.GetChild(1).GetChild(0).GetComponent <Text>().text)
                        {
                            dahaOnceCikti = true;
                            break;
                        }
                        else
                        {
                            dahaOnceCikti = false;
                        }
                    }
                    if (dahaOnceCikti == false)
                    {
                        cikanHarfler.Add(clickControl.SelectedObject);
                    }
                }

                foreach (var item in letterCount)
                {
                    if (clickControl.SelectedObject != null && item.ToString() == clickControl.SelectedObject.name.Substring(8, 1).ToString())
                    {
                        if (dahaOnceCikti == false)
                        {
                            dogruMu  = true;
                            yanlisMi = false;
                            break;
                        }
                        else
                        {
                            dogruMu  = false;
                            yanlisMi = false;
                            break;
                        }
                    }
                    else
                    {
                        if (dahaOnceCikti == false)
                        {
                            yanlisMi = true;
                            dogruMu  = false;
                        }
                        else
                        {
                            dogruMu  = false;
                            yanlisMi = false;
                        }
                    }
                }
                clickControl.SelectedObject = null;

                if (dogruMu == true && bilindiMi != 0 && yanlisBilmeHakkiYedek != 0)
                {
                    bilindiMi--;
                    dogruMu = false;
                }
                if (yanlisMi == true && bilindiMi != 0 && yanlisBilmeHakkiYedek != 0)
                {
                    yanlisBilmeHakkiYedek--;
                    YanlisBilmeHakkiText.GetComponent <Text>().text = "Kalan Hak " + yanlisBilmeHakkiYedek + "/" + YanlisBilmeHakki;
                    yanlisMi = false;
                }
                if (bilindiMi == 0 && yanlisBilmeHakkiYedek != 0)
                {
                    DogruBilmeSayisiYedek++;
                    MuzikCalsin = true;
                    if (DogruBilmeSayisiYedek < DogruBilmeSayisi)
                    {
                        kelimeSecildi      = false;
                        sonrakineGecButton = true;
                    }
                }
            }
            if (kelimeSecildi == false && sonrakineGecButton == false && DogruBilmeSayisiYedek < DogruBilmeSayisi)
            {
                foreach (var item in CardLetters)
                {
                    Destroy(item.Card);
                }
                cikanHarfler = new List <GameObject>();
                CardLetters  = new List <LetterCards>();
                KelimeSec();
                yanlisBilmeHakkiYedek = YanlisBilmeHakki;
                YanlisBilmeHakkiText.GetComponent <Text>().text = "Kalan Hak " + yanlisBilmeHakkiYedek + "/" + YanlisBilmeHakki;
                kelimeSecildi = true;
            }
            if (yanlisBilmeHakkiYedek <= 0)
            {
                YanlisMuziki = true;
                adamDusecek  = true;
                foreach (var item in CardLetters)
                {
                    if (item.Card.transform.GetChild(1).GetChild(0).GetComponent <Text>().text != null)
                    {
                        item.Card.transform.GetChild(1).GetChild(0).GetComponent <Text>().text = item.Letter.ToString();
                    }
                }
            }
            //if (DusecekKafes != null && adamDusecek == true && YanlisMuziki == false)
            //{
            //    YanlisMuziki = true;
            //}
        }
        if (DogruBilmeSayisiYedek == DogruBilmeSayisi)
        {
            oyunKazanildi = true;
        }
        if (DusecekKafes != null && adamDusecek == true /*&& DusecekKafes.GetComponent<Rigidbody>().useGravity == false*/)
        {
            DusecekKafes.transform.position = Vector3.MoveTowards(DusecekKafes.transform.position, new Vector3(DusecekKafes.transform.position.x, CarpmaNoktasi.transform.position.y, DusecekKafes.transform.position.z), 150 * Time.deltaTime);
            Time.timeScale = 1;
        }
    }
Example #11
0
    void Awake()
    {
        playerInstance = GameObject.Find("Player").GetComponent<Player>();

        gameControlInstance = gc.GetComponent<GameControl> ();
        gameControlGUIInstance = gc.GetComponent<GameControlGUI> ();
        shopControlInstance = gc.GetComponent<ShopControl> ();
        shopControlGUIInstance = gc.GetComponent<ShopControlGUI> ();
        clickControlInstance = gc.GetComponent<ClickControl> ();
        gridControlInstance = gc.GetComponent<GridControl>();
        optionControlInstance = gc.GetComponent<OptionControl>();
        dragControlInstance = gc.GetComponent<DragControl>();
        eventGUIInstance = gc.GetComponent<EventGUI>();
        enemyLibraryInstance = gc.GetComponent<EnemyLibrary>();
        cardLibraryInstance = gc.GetComponent<CardLibrary>();
        goalLibraryInstance = gc.GetComponent<GoalLibrary>();
        guiStyleLibraryInstance = gc.GetComponent<GUIStyleLibrary>();
        mainMenuInstance = gc.GetComponent<MainMenu>();
        encyclopediaMenuInstance = gc.GetComponent<EncyclopediaMenu>();
        godChoiceMenuInstance = gc.GetComponent<GodChoiceMenu>();
        customizeMenuInstance = gc.GetComponent<CustomizeMenu>();
        gridCursorControlInstance = gc.GetComponent<GridCursorControl>();
        menuControlInstance = gc.GetComponent<MenuControl>();
        tutorialInstance = gc.GetComponent<Tutorial>();
        deckAnimateInstance = deck.GetComponent<DeckAnimate>();

        shopAndGoalParentCanvasInstance = goalandshopparent
                                          .GetComponent<ShopAndGoalParentCanvas>();
        shopGridCanvasInstance = shopgrid
                                 .GetComponent<ShopGridCanvas>();
        gridCursorControlGUIInstance = gridcursorcontrolgui
                                       .GetComponent<GridCursorControlGUI>();
    }