Пример #1
0
    protected override void OnInit()
    {
        this.adx = this.mAdTurnCtrl.transform.localPosition.x;
        this.mTurnCtrl.TurnEnd = delegate(TurnTableData data) {
            this.resultType = data.type;
            if (LocalSave.Instance.BattleAd_CanShow())
            {
                SdkManager.send_event_ad(ADSource.eTurntable, "SHOW", 0, 0, string.Empty, string.Empty);
                TweenSettingsExtensions.AppendCallback(TweenSettingsExtensions.AppendInterval(TweenSettingsExtensions.Append(TweenSettingsExtensions.AppendInterval(TweenSettingsExtensions.SetUpdate <Sequence>(this.mSeqPool.Get(), true), 0.5f), TweenSettingsExtensions.SetEase <Tweener>(ShortcutExtensions.DOLocalMoveX(this.gameturnparent.transform, -this.adx, 0.5f, false), 0x1b)), 0.5f), new TweenCallback(this, this.< OnInit > m__3));
            }
            else
            {
                WindowUI.CloseWindow(WindowID.WindowID_GameTurnTable);
            }
        };
        RectTransform transform  = base.transform as RectTransform;
        RectTransform transform2 = this.gameturnparent.transform as RectTransform;

        transform2.sizeDelta = transform.sizeDelta;
        RectTransform transform3 = this.mAdTurnCtrl.transform as RectTransform;

        transform3.sizeDelta = transform.sizeDelta;
        this.mAdTurnCtrl.Init();
        if (< > f__am$cache0 == null)
        {
 protected override void OnInit()
 {
     this.mTurnCtrl.TurnEnd = delegate(TurnTableData data) {
         this.resultType = data.type;
         WindowUI.CloseWindow(WindowID.WindowID_EventFirstGold);
     };
 }
Пример #3
0
    private void OnApplicationPause(bool value)
    {
        if (this.bFirstInGame)
        {
            this.bFirstInGame = false;
        }
        else
        {
            this.isPause = value;
            if (OnAppPause != null)
            {
                OnAppPause(this.isPause);
            }
            if (value)
            {
                CInstance <PlayerPrefsMgr> .Instance.gametime.flush();

                SdkManager.send_app_end();
            }
            else
            {
                if ((GameLogic.InGame && (GameLogic.Hold.BattleData.GetMode() != GameMode.eMatchDefenceTime)) && (!GameLogic.Paused && !WindowUI.IsWindowOpened(WindowID.WindowID_Pause)))
                {
                    WindowUI.ShowWindow(WindowID.WindowID_Pause);
                }
                if (!GameLogic.InGame && this.bOnlyMain)
                {
                }
                SdkManager.send_event("app_start");
            }
        }
    }
Пример #4
0
 protected override void OnInit()
 {
     this.mTurnCtrl.TurnEnd = delegate(TurnTableType type) {
         this.resultType = type;
         WindowUI.CloseWindow(WindowID.WindowID_EventChect1);
     };
 }
Пример #5
0
    public Window(GameObject windowObject, Vector3 initialPosition)
    {
        this.windowObject = windowObject;
        ui = windowObject.GetComponent <WindowUI>();

        windowObject.transform.position = initialPosition;
    }
Пример #6
0
        public void Dispose()
        {
            if (FormUI != null)
            {
                FormUI.FormClosed -= UserInterface_Closed;
                FormUI.Close();
                FormUI = null;
            }
            else if (WindowUI != null)
            {
                WindowUI.Closed -= UserInterface_Closed;
                WindowUI.Close();
                WindowUI = null;
            }
            else if (Instance != null)
            {
                Instance.Dispose();
            }

            IEnumerable <TaskCompletionSource <HPacket> > handledDataSources = DataAwaiters.Values.ToArray();

            foreach (TaskCompletionSource <HPacket> handledDataSource in handledDataSources)
            {
                handledDataSource.SetResult(null);
            }

            Instance     = null;
            CurrentState = DISPOSED_STATE;
        }
 protected override void OnOpen()
 {
     WindowUI.ShowCurrency(WindowID.WindowID_Currency);
     GameLogic.SetPause(true);
     this.bDealed = false;
     this.InitUI();
 }
    private void InitUI()
    {
        this.mAchieveCtrl.Show(false);
        this.mGoldCtrl.gameObject.SetActive(true);
        WindowUI.CloseCurrency();
        if (this.Button_Pause != null)
        {
            this.Button_Pause.gameObject.SetActive(!GameLogic.Hold.Guide.GetNeedGuide());
            this.Button_Pause.onClick = new Action(this.OnClickPause);
        }
        ReleaseModeManager mode = GameLogic.Release.Mode;

        mode.OnGotoNextRoom = (Action <RoomGenerateBase.Room>)Delegate.Combine(mode.OnGotoNextRoom, new Action <RoomGenerateBase.Room>(this.OnGotoNextRoom));
        GameLogic.Hold.Sound.PlayBackgroundMusic(SoundManager.BackgroundMusicType.eBattle);
        CameraControlM.Instance.PlayStartAnimate(null);
        if (this.mExpCtrl != null)
        {
            this.mExpCtrl.Init();
        }
        if (this.mHPCtrl != null)
        {
            this.mHPCtrl.Init();
        }
        this.mActionUpdateCtrl = new ActionUpdateCtrl();
        this.mActionUpdateCtrl.Init(false);
        this.UpdateGold();
        this.ShowBossHP(false);
        this.StartGame();
    }
Пример #9
0
    private void Start()
    {
        _Instance = this;
        ResourceManager.Init();
        GameConfig.Init();
        SdkManager.set_first_setup_time();
        SdkManager.send_event("app_start");
        LocalModelManager.Instance.Stage_Level_chapter1.Init();
        LocalModelManager.Instance.Equip_equip.Init();
        LocalModelManager.Instance.Character_Level.Init();
        LocalModelManager.Instance.Stage_Level_stagechapter.Init();
        LocalModelManager.Instance.Stage_Level_activitylevel.Init();
        LocalModelManager.Instance.Stage_Level_activity.Init();
        LocalModelManager.Instance.Achieve_Achieve.Init();
        LocalModelManager.Instance.Shop_MysticShop.Init();
        CInstance <PlayerPrefsMgr> .Instance.Init();

        AdsRequestHelper.Init();
        AdsRequestHelper.getRewardedAdapter().isLoaded();
        LocalSave.Instance.InitData();
        LocalSave.Instance.BattleIn_CheckInit();
        GameLogic.Hold.Guide.Init();
        this._InitNameGenerator();
        SdkManager.InitSdks();
        Debug.unityLogger.logEnabled = false;
        NetManager.mNetCache.Init();
        NetManager.StartPing();
        WindowUI.Init();
        this._InitPureMVC();
    }
Пример #10
0
    // Use this for initialization
    void Start()
    {
        // Ensure the settings have been set.
        if (!PlayerPrefs.HasKey("Move_Forward"))
        {
            settingsPanel.SetActive(true);
            List <string> s = new List <string>();
            s.Add("Ok");
            WindowUI wui = new WindowUI(WindowImage.INFO, WindowType.OK, s, "Confirm Settings", "Welcome to City Sandbox! To start off confirm your control settings. Click the close button when you are done to go the the main menu!", false, 25, ExitDefault.CLOSEOPERATION);
            wui.SetBackgroundActive(true);
            wui.Display();
        }
        else
        {
            settingsPanel.SetActive(false);
        }

        controlsPanel.SetActive(true);
        audioPanel.SetActive(false);
        gameplayPanel.SetActive(false);

        controlButton.gameObject.GetComponent <Image>().color  = new Color32(141, 141, 142, 100);
        audioButton.gameObject.GetComponent <Image>().color    = Color.white;
        gameplayButton.gameObject.GetComponent <Image>().color = Color.white;

        if (screenRes.options[screenRes.value].text != "Auto")
        {
            string[] s = new SettingsManager().getSettingString("ScreenRes").Split('x');
            Screen.SetResolution(Int32.Parse(s[0]), Int32.Parse(s[1]), fullScreen.isOn);
        }
    }
Пример #11
0
 public void create()
 {
     if (input.text != "")
     {
         if (File.Exists(Application.persistentDataPath + Path.DirectorySeparatorChar + "saves" + Path.DirectorySeparatorChar + input.text + ".dat"))
         {
             List <string> s = new List <string>();
             s.Add("ok");
             WindowUI wui = new WindowUI(WindowImage.WARNING, WindowType.OK, s, "World Creation Error", "The world name already exists.", true, 11, ExitDefault.CLOSEOPERATION);
             wui.Display();
         }
         else
         {
             World.name     = input.text;
             World.newWorld = true;
             SceneManager.LoadScene("Project");
         }
     }
     else
     {
         List <string> s = new List <string>();
         s.Add("ok");
         WindowUI wui = new WindowUI(WindowImage.WARNING, WindowType.OK, s, "World Creation Error", "The world name cannot be nothing!", true, 1, ExitDefault.CLOSEOPERATION);
         wui.Display();
     }
 }
Пример #12
0
 public override void Copy(WindowUI window)
 {
     for (int index = 0; index < m_spellSlots.Length; ++index)
     {
         m_spellSlots[index].SetSlotIndex(index + 1);
     }
 }
Пример #13
0
 // Use this for initialization
 void Start()
 {
     terr = Terrain.activeTerrain;
     float[,] orgTerrain = terr.terrainData.GetHeights(0, 0, terr.terrainData.heightmapResolution, terr.terrainData.heightmapResolution);
     for (int x = 0; x < terr.terrainData.heightmapResolution; x++)     //^^ Gets current terrain data.
     {
         for (int y = 0; y < terr.terrainData.heightmapResolution; y++) //Loops through every value.
         {
             orgTerrain[x, y] = 0;                                      //Sets the height to zero.
         }
     }
     terr.terrainData.SetHeights(0, 0, orgTerrain); //Applies the changes.
     if (!World.newWorld)
     {
         sal.Load(World.name); //Load Objects
         if (sal.isOldFile)
         {
             List <string> s = new List <string>();
             s.Add("Continue");
             s.Add("Exit to Main Menu");
             WindowUI wui = new WindowUI(WindowImage.WARNING, WindowType.YES_NO, s, "Pre Alpha 1.6 Version", "It looks like you are loading a world from a version of the game before Alpha 1.6. Would you like to continue loading the world and update it to the new format?", false, 4, ExitDefault.CLOSEOPERATION);
             wui.Display();
         }
         forLoop(sal.obj);                                   //Spawn in objects.
     }
     if (sal.loadHeights != null)                            //Checks if there is any heightmap stored.
     {
         terr.terrainData.SetHeights(0, 0, sal.loadHeights); //Load heights.
     }
 }
Пример #14
0
    private void onClickButtonInternal(int count)
    {
        bool flag  = false;
        bool flag2 = false;

        if (LocalSave.Instance.GetDiamondBoxFreeCount(base.mBoxType) > 0)
        {
            flag  = true;
            flag2 = true;
        }
        else
        {
            count = MathDxx.Clamp(count, 0, base.mTransfer.diamonds.Length - 1);
            if (base.CheckCanOpen(2, this.get_price(count)))
            {
                flag2 = true;
            }
        }
        if (flag2)
        {
            if (LocalSave.Instance.GetTimeBoxCount(LocalSave.TimeBoxType.BoxChoose_DiamondNormal) > 0)
            {
                SdkManager.send_event_ad(ADSource.eDiamondNormal, "CLICK", 0, 0, string.Empty, string.Empty);
            }
            if (!NetManager.IsNetConnect)
            {
                CInstance <TipsUIManager> .Instance.Show(ETips.Tips_NetError, Array.Empty <string>());

                if (LocalSave.Instance.GetTimeBoxCount(LocalSave.TimeBoxType.BoxChoose_DiamondNormal) > 0)
                {
                    SdkManager.send_event_ad(ADSource.eDiamondNormal, "IMPRESSION", 0, 0, "FAIL", "NET_ERROR");
                }
            }
            else if (LocalSave.Instance.GetTimeBoxCount(LocalSave.TimeBoxType.BoxChoose_DiamondNormal) > 0)
            {
                if (LocalSave.Instance.IsAdFree())
                {
                    this.send_get_box();
                }
                else if (!AdsRequestHelper.getRewardedAdapter().isLoaded())
                {
                    SdkManager.send_event_ad(ADSource.eDiamondNormal, "IMPRESSION", 0, 0, "FAIL", "AD_NOT_READY");
                    WindowUI.ShowAdInsideUI(AdInsideProxy.EnterSource.eGameTurn, delegate {
                        SdkManager.send_event_ad(ADSource.eDiamondNormal, "REWARD", 0, 0, "INSIDE", string.Empty);
                        this.send_get_box();
                    });
                }
                else
                {
                    AdsRequestHelper.getRewardedAdapter().Show(this);
                    SdkManager.send_event_ad(ADSource.eDiamondNormal, "IMPRESSION", 0, 0, "SUCCESS", string.Empty);
                }
            }
            else
            {
                this.send_get_box();
            }
        }
    }
Пример #15
0
    private void OnClickOK1()
    {
        GameLogic.Self.AddSkill(this.mData.getid, Array.Empty <object>());
        GameLogic.Release.Form.RemoveID("AngelSkill", this.mData.formid);
        CInstance <TipsManager> .Instance.ShowSkill(this.mData.getid);

        WindowUI.CloseWindow(WindowID.WindowID_EventAngel);
    }
Пример #16
0
 public void ResetCursor()
 {
     SetCursor(m_cursorType);
     m_selectedSlot         = null;
     m_selectedWindow       = null;
     m_selectedWindowOffset = Vector3.zero;
     ClearCursorSlot();
 }
 protected override void OnInit()
 {
     this.mTurnCtrl.TurnEnd = delegate(TurnTableData data) {
         this.resultType = data.type;
         WindowUI.CloseWindow(WindowID.WindowID_EventRewardTurn);
     };
     if (< > f__am$cache0 == null)
     {
Пример #18
0
 private void OnClickClose()
 {
     if (this.onEventClose != null)
     {
         this.onEventClose();
     }
     WindowUI.CloseWindow(WindowID.WindowID_CardLevelUp);
 }
Пример #19
0
    private void ShowRetry()
    {
        string languageByTID = GameLogic.Hold.Language.GetLanguageByTID("first_login_title", Array.Empty <object>());
        string content       = GameLogic.Hold.Language.GetLanguageByTID("first_login_content", Array.Empty <object>());
        string sure          = GameLogic.Hold.Language.GetLanguageByTID("common_retry", Array.Empty <object>());

        WindowUI.ShowPopWindowOneUI(languageByTID, content, sure, false, () => TweenSettingsExtensions.AppendCallback(TweenSettingsExtensions.AppendInterval(DOTween.Sequence(), 1f), new TweenCallback(this, this.< ShowRetry > m__6)));
    }
Пример #20
0
 private void Update()
 {
     if (this.bStartLogin && (LocalSave.Instance.GetServerUserID() > 0L))
     {
         WindowUI.CloseWindow(WindowID.WindowID_VideoPlay);
         WindowUI.ShowWindow(WindowID.WindowID_Login);
     }
 }
Пример #21
0
 protected override void OnClose()
 {
     WindowUI.CloseCurrency();
     if (this.onUIClose != null)
     {
         this.onUIClose();
     }
 }
Пример #22
0
    private void OnClickOK()
    {
        GameLogic.Self.AddSkill(this.mGetid, Array.Empty <object>());
        GameLogic.Release.Form.RemoveID("DemonSkill", this.mFormid);
        CInstance <TipsManager> .Instance.ShowSkill(this.mGetid);

        GameLogic.Self.GetGoods(this.mLoseid);
        WindowUI.CloseWindow(WindowID.WindowID_EventDemon);
    }
Пример #23
0
    public void AddWindowToHierarchy(WindowUI window)
    {
        GameObject windowObject = window.gameObject;

        windowObject.transform.SetParent(transform);
        windowObject.transform.SetAsLastSibling();
        windowObject.transform.localPosition = GetWindowPosition(window);
        UpdateSorting();
    }
Пример #24
0
        private IEnumerator Start()
        {
            WindowUI.ShowInstruction(PictureWindowUI.INSTRUCTION.TopLeft);

            // Set Cursor to not be visible
            Cursor.visible = false;

            yield return(StartCoroutine(Initialize()));
        }
Пример #25
0
 private void Awake()
 {
     this.Button_Challenge.onClick = delegate {
         WindowUI.CloseWindow(WindowID.WindowID_Challenge);
         GameLogic.Hold.BattleData.Challenge_UpdateMode(this.m_ID);
         GameLogic.Hold.Sound.PlayUI(0xf4243);
         WindowUI.ShowWindow(WindowID.WindowID_Battle);
     };
 }
Пример #26
0
 private void OnClickButton()
 {
     WindowUI.CloseWindow(WindowID.WindowID_Active);
     GameLogic.Hold.BattleData.ActiveID = this.mData.ID;
     Debugger.Log("ActiveID = " + GameLogic.Hold.BattleData.ActiveID);
     GameLogic.Hold.BattleData.SetMode(this.mData.GetMode(), BattleSource.eActivity);
     GameLogic.Hold.Sound.PlayUI(0xf4243);
     WindowUI.ShowWindow(WindowID.WindowID_Battle);
 }
Пример #27
0
    public void settings()
    {
        List <string> s = new List <string>();

        s.Add("Ok");
        WindowUI wui = new WindowUI(WindowImage.INFO, WindowType.OK, s, "Coming Soon", "This feature is coming soon!", true, 7, ExitDefault.CLOSEOPERATION);

        wui.Display();
    }
Пример #28
0
 public void StartGuide()
 {
     if ((this.process == 0) && this.GetCanStartGuide())
     {
         this.process = 1;
         WindowUI.ShowMask(true);
         WindowUI.ShowMask(false);
     }
 }
Пример #29
0
 private void OnClickOpen(int index, MailOneCtrl one)
 {
     MailInfoProxy.Transfer data = new MailInfoProxy.Transfer {
         data = this.mList[index],
         ctrl = one
     };
     Facade.Instance.RegisterProxy(new MailInfoProxy(data));
     WindowUI.ShowWindow(WindowID.WindowID_MailInfo);
 }
Пример #30
0
    void Awake()
    {
        upParticle = Resources.Load("Upgrade Particle System") as GameObject;
        int cardCount = GameManager.instance.AllCards.Count;

        for (int i = 0; i < cardCount; i++)
        {
            CardSet cardSet = GameManager.instance.AllCards[i];
            if (cardSet.upgradeLevel > 4)
            {
                continue;
            }

            CardPicker picker = Instantiate(pickerPrefab);
            picker.transform.SetParent(layoutGroup.transform);

            picker.SetOption(cardSet.showCard, (cardPicker) =>
            {
                WindowUI win = Instantiate(MainUIMnager.Instance.window);
                win.GetComponent <ChooseWindowUI>().SetWindow("카드 강화", "계속 하시겠습니까?\n\n" + string.Format("{0} -> {1}", cardSet.upgradeLevel, cardSet.upgradeLevel + 1), "네", "아니요", () =>
                {
                    int cost = cardSet.showCard.card.upgradeCostPerLevel;
                    if (cardSet.showCard.card.upgradeCostPerLevel <= GameManager.instance.goldCount && cardSet.showCard.card.upgradeGemPerLevel <= GameManager.instance.GetGem(cardSet.showCard.card.type))
                    {
                        GameManager.instance.AddGold(-cost);
                        GameManager.instance.AddGem(cardSet.showCard.card.type, -cardSet.showCard.card.upgradeGemPerLevel);

                        cardSet.upgradeLevel++;

                        GameObject temp = Instantiate(upParticle, cardPicker.transform.position, Quaternion.identity);
                        Destroy(temp, 3.0f);

                        GameDataHandler.SaveCards(GameManager.instance.AllCards);

                        Destroy(win.gameObject);
                        if (cardSet.upgradeLevel > 4)
                        {
                            Destroy(picker.gameObject);
                        }
                    }
                    else
                    {
                        Destroy(win.gameObject);
                        win = Instantiate(MainUIMnager.Instance.window);
                        win.GetComponent <ChooseWindowUI>().SetWindow("강화 실패", "재료가 부족합니다.", "확인", "취소", () =>
                        {
                        }, () => Destroy(win.gameObject));
                    }
                }, () => Destroy(win.gameObject));
            });
        }

        Canvas cam = transform.GetChild(0).GetComponent <Canvas>();

        cam.worldCamera = Camera.main;
    }
Пример #31
0
 void MachineMessageBox_MachineNoClickEvent(object sender, WindowUI.PPCTerminal.UserControls.UserControlEventBaseInfo<string> e)
 {
     if (e != null)
     {
         this.ShowMachineForm(e.ObjectInformation);
     }
 }