Beispiel #1
0
        private void OnBackButtonClick()
        {
            if (DynamicParametersManager.Instance.Get(DynamicParameterType.ArtistsCount).Level <= 1)
            {
                return;
            }

            SetBackButtonActive(false);

            AudioClipData audioClipData = ConfigManager.Instance.Get <AudioConfig>().OpenPopupAudioClipData;

            AudioManager.Instance.PlaySoundFx(audioClipData);

            LoadingScreen loadingScreen = ScreensManager.Instance.GetScreen <LoadingScreen>();

            loadingScreen.Initialize(SceneType.Main);
            loadingScreen.Show();

            IUserProfileModel userProfileModel = ServiceLocator.Instance.Get <IUserProfileModel>();

            if (userProfileModel.TutorialStage == (int)TutorialType.ReturnToCity)
            {
                TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();
                tutorialPopup.Hide();

                userProfileModel.TutorialStage++;
            }
        }
    public void UpdatePopup()
    {
        for (int i = 0; i < popups.Count; i++)
        {
            popups[i].SetActive(false);
        }
        popups[currentSection].SetActive(true);
        TutorialPopup popComp = popups[currentSection].GetComponent <TutorialPopup>();

        popComp.ShowText(sections[currentSection].Text[currentSectionPart]);
    }
Beispiel #3
0
        private void TryToShowBuyTutorial(ProductionBuilding productionBuilding)
        {
            if (ServiceLocator.Instance.Get <IUserProfileModel>().CurrentCityProgress.UnlockedBuildings > 0)
            {
                return;
            }

            TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();

            tutorialPopup.InitializeTutorial(TutorialType.BuyHouse);
            tutorialPopup.Show();
        }
Beispiel #4
0
 public void Awake()
 {
     if (_instance != null && _instance != this)
     {
         Destroy(gameObject);
     }
     else
     {
         _instance = this;
         DontDestroyOnLoad(this);
     }
 }
Beispiel #5
0
        private void TryToShowBuyArtistTutorial()
        {
            if (DynamicParametersManager.Instance.Get(DynamicParameterType.ArtistsCount).Level > 1)
            {
                return;
            }

            TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();

            tutorialPopup.InitializeTutorial(TutorialType.BuyArtists);
            tutorialPopup.Show();
        }
Beispiel #6
0
        public void TryToShowBackButtonTutorial()
        {
            IUserProfileModel userProfileModel = ServiceLocator.Instance.Get <IUserProfileModel>();

            if (userProfileModel.CurrentCityProgress.UnlockedBuildings > 1 || userProfileModel.TutorialStage != (int)TutorialType.ReturnToCity)
            {
                return;
            }

            TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();

            tutorialPopup.InitializeTutorial(TutorialType.ReturnToCity);
            tutorialPopup.Show();
        }
Beispiel #7
0
    private void showPopupAtPosition(string popupID, GameObject popup, Vector2 position, float scale)
    {
        TutorialPopup component = popup.GetComponent <TutorialPopup>();

        if (component != null)
        {
            if (popupMap.ContainsKey(popupID))
            {
                hidePopup(popupID);
            }
            popupMap[popupID] = component;
            Transform parent = base.transform.Find("VertLayout/Layout");
            popup.transform.SetParent(parent, worldPositionStays: false);
            popup.GetComponent <RectTransform>().anchoredPosition = position;
            popup.transform.localScale = new Vector3(scale, scale, 1f);
        }
    }
Beispiel #8
0
        private void TryToShowSpeedUpTutorial()
        {
            IUserProfileModel userProfileModel = ServiceLocator.Instance.Get <IUserProfileModel>();

            if (userProfileModel.CurrentCityProgress.UnlockedBuildings > 1 || userProfileModel.TutorialStage > (int)TutorialType.SpeedUpArtists)
            {
                TryToShowBuyArtistTutorial();
                return;
            }

            TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();

            tutorialPopup.InitializeTutorial(TutorialType.SpeedUpArtists);
            tutorialPopup.Show();

            ServiceLocator.Instance.Get <InputService>().eventOnPointerDown += OnTutorialPointerDown;
        }
Beispiel #9
0
        private void OnArtistAdded()
        {
            IUserProfileModel userProfileModel = ServiceLocator.Instance.Get <IUserProfileModel>();

            if (userProfileModel.TutorialStage == (int)TutorialType.BuyArtists)
            {
                userProfileModel.TutorialStage++;
                TutorialPopup tutorialPopup = PopupManager.Instance.GetPopup <TutorialPopup>();
                tutorialPopup.Hide();
            }

            TeamManager.Instance.BusyArtistsCount += 1;

            var buildings = userProfileModel.CurrentCityProgress.productionBuildings;

            buildings[userProfileModel.OpenedBuildingId].artistsCount = userProfileModel.OpenedBuildingArtists += 1;

            SpawnArtist();
        }
Beispiel #10
0
    protected override void InitUI()
    {
        base.InitUI();

        //인게임 HUD패널 생성
        HudPanel = UIMgr.Open("UIPanel/InGameHUDPanel").GetComponent <InGameHUDPanel>();

        if (TutorialGameState.IsTutorial)
        {
            //ChatPopup chat = UIMgr.OpenChatPopup();
            UIBasePanel chat = UIMgr.GetUIBasePanel("UIPopup/ChatPopup");
            if (chat != null)
            {
                chat.Hide();
            }

            TutorialUI = UIMgr.OpenTutorialPopup((int)TutorialType.INGAME);
            //OnTutorial((InGameTutorialType)1);
        }

        //	   Debug.LogWarning("2JW : InitUI() In - " + HudPanel);
    }