Пример #1
0
    public void clickBackground()
    {
        InstagramController.currentBackground = gameObject.name;
        //reset everything to the first posture being able to use in this background
        if (FinalCameraController.alreadyClothUI == false)
        {
            if (FinalCameraController.isSwipping == false && !FinalCameraController.isTutorial)
            {
                InstagramController.CalculateInventory.resetPosture();

                FinalCameraController.CancelAllUI(false);
                photoBackground.sprite = InstagramController.allBackAd[transform.name];
                InstagramController.currentBackground = transform.name;

                FinalCameraController.GoAdvertisement();
            }
            else if (FinalCameraController.isSwipping == false && FinalCameraController.isTutorial)
            {
//              if (InstagramController.AdAlreadyTakenList[transform.name])
//              {
                if (FinalCameraController.TutorialManager.tutorialNumber == 0)
                {
                    //cancel dialogues and the touch tutorial
                    //TutorialManager.tutorialDialogueState = TutorialManager.DialogueState.none;

                    FinalCameraController.Show(TutorialManager.hintArrowCG);
                    TutorialManager.hintArrow.transform.SetParent(TutorialManager.screenshot.transform);
                    TutorialManager.hintArrow.GetComponent <RectTransform>().anchoredPosition = new Vector2(-0.5f, 0f);

                    photoBackground.sprite = InstagramController.allBackAd[transform.name];
                    InstagramController.currentBackground = transform.name;

                    FinalCameraController.GoAdvertisement();
                }
                else if (FinalCameraController.TutorialManager.tutorialNumber == 2 || FinalCameraController.TutorialManager.tutorialNumber == 3)
                {
                    TutorialManager.fishText.text = "Don't touch it! Come over here!";
                    TutorialManager.KararaStandingImage.enabled = true;
                }
                else if (FinalCameraController.TutorialManager.tutorialNumber == 15)
                {
                    print("transform name = " + transform.name);
                    photoBackground.sprite = InstagramController.allBackAd[transform.name];

                    InstagramController.currentBackground = transform.name;

                    FinalCameraController.GoAdvertisement();
                }

//              }
            }
        }
        else
        {
            Destroy(FinalCameraController.generatedNotice);
            Destroy(FinalCameraController.currentClothUI);
            FinalCameraController.alreadyClothUI = false;
        }
    }