Ejemplo n.º 1
0
 void Awake()
 {
     titlePanel          = GetComponentInChildren <TitlePanel> (true);
     selectMapPanel      = GetComponentInChildren <SelectMapPanel> (true);
     settingPanel        = GetComponentInChildren <SettingPanel> (true);
     addMapPanel         = GetComponentInChildren <AddMapPanel> (true);
     loadingMapPanel     = GetComponentInChildren <LoadingMapPanel> (true);
     pausePanel          = GetComponentInChildren <PausePanel> (true);
     titleBackPanel      = GetComponentInChildren <TitleBackPanel> (true);
     unsupportedMapPanel = GetComponentInChildren <UnsupportedMapPanel> (true);
     deleteMapPanel      = GetComponentInChildren <DeleteMapPanel> (true);
 }
Ejemplo n.º 2
0
 public void OnclickSetting()
 {
     if (!GameObject.FindGameObjectWithTag("PANEL"))
     {
         SettingPanel chrarter = Instantiate(settingPrefab, transform.parent.parent).GetComponent <SettingPanel>();
     }
     else
     {
         PanelManager game = GameObject.FindGameObjectWithTag("PANEL").GetComponent <PanelManager>();
         game.Close();
         SettingPanel chrarter = Instantiate(settingPrefab, transform.parent.parent).GetComponent <SettingPanel>();
     }
 }
Ejemplo n.º 3
0
    void Awake()
    {
        instance        = this;
        startPanel      = transform.Find("PanelStart").GetComponent <StartPanel>();
        newGamePanel    = transform.Find("PanelNewGame").GetComponent <NewGamePanel>();
        joinGamePanel   = transform.Find("PanelJoinGame").GetComponent <JoinGamePanel>();
        settingPanel    = transform.Find("PanelSetting").GetComponent <SettingPanel>();
        exitPanel       = transform.Find("PanelExit").GetComponent <ExitPanel>();
        messagePanel    = transform.Find("PanelMessage").GetComponent <MessagePanel>();
        playerInfoPanel = transform.Find("PanelPlayerInfo").GetComponent <PlayerInfoPanel>();
        teamPanel       = transform.Find("PanelTeam").GetComponent <TeamPanel>();
        shopPanel       = transform.Find("PanelShop");

        curHangingText  = transform.Find("CurHanging").GetComponent <Text>();
        curInGamingText = transform.Find("CurInGaming").GetComponent <Text>();
    }
Ejemplo n.º 4
0
        private void OpenSettingPanel()
        {
            if (workingResources.IsSettingPanelOpen)
            {
                return;
            }
            SettingPanelBackground.Visibility = Visibility.Visible;
            SettingPanel.Visibility           = Visibility.Visible;
            SettingPanelBackground.BeginAnimation(WidthProperty, null);
            SettingPanel.BeginAnimation(OpacityProperty, null);
            SettingPanel.Opacity = 1;
            DoubleAnimation slideInAnimation = new DoubleAnimation(0, 500, TimeSpan.FromSeconds(0.25), FillBehavior.HoldEnd);

            SettingPanelBackground.BeginAnimation(WidthProperty, slideInAnimation);
            workingResources.IsSettingPanelOpen = true;
        }
Ejemplo n.º 5
0
    public void ChangeMovementTypeLeft(SettingPanel settingPanel)
    {
        MovementType currentMovementType = XRSettings.Instance.settings.MovementType;
        int          enumVal             = (int)currentMovementType;
        int          lastVal             = (int)Enum.GetValues(typeof(MovementType)).Cast <MovementType>().Last();

        enumVal--;

        if (enumVal < 0)
        {
            enumVal = lastVal;
        }

        XRSettings.Instance.ChangeMovementType((MovementType)enumVal);
        ChangeText("Movement Type: " + ((MovementType)enumVal).ToString(), settingPanel);
    }
Ejemplo n.º 6
0
        private void CommandBinding_Executed_1(object sender, ExecutedRoutedEventArgs e)
        {
            if (!workingResources.IsSettingPanelOpen)
            {
                return;
            }

            SettingPanelBackground.BeginAnimation(WidthProperty, null);
            SettingPanel.BeginAnimation(OpacityProperty, null);
            DoubleAnimation slideInAnimation = new DoubleAnimation(500, 0, TimeSpan.FromSeconds(0.25), FillBehavior.HoldEnd);
            DoubleAnimation fadeOut          = new DoubleAnimation(1, 0, TimeSpan.FromSeconds(0.25), FillBehavior.HoldEnd);

            fadeOut.Completed += FadeOut_Completed;
            SettingPanelBackground.BeginAnimation(WidthProperty, slideInAnimation);
            SettingPanel.BeginAnimation(OpacityProperty, fadeOut);
            workingResources.IsSettingPanelOpen = false;
        }
Ejemplo n.º 7
0
 void SettingClick()
 {
     if (setting == null)
     {
         Facade.ShowPanel <SettingPanel>(panel =>
                                         { panel.gameObject.SetActive(true); setting = panel; });
         return;
     }
     if (setting.gameObject.activeSelf)
     {
         setting.HidePanel();
     }
     else
     {
         setting.ShowPanel();
     }
 }
Ejemplo n.º 8
0
    private void InitUIElement()
    {
        txtScoreCPU     = FindComponent <TxtNum>("TxtScoreCPU");
        txtScoreGPU     = FindComponent <TxtNum>("TxtScoreGPU");
        txtScoreRAM     = FindComponent <TxtNum>("TxtScoreRAM");
        txtScoreBattery = FindComponent <TxtNum>("TxtScoreBattery");
        txtScoreDisplay = FindComponent <TxtNum>("TxtScoreDisplay");
        txtScore        = FindComponent <TxtNum>("TxtScore");
        txtError        = FindComponent <TxtNum>("TxtError");
        btnPuase        = FindComponent <Button>("BtnPause");

        imgLevel        = FindComponent <ImgLevel>("ImgLevel");
        imgBatteryState = FindComponent <ImgBatteryState>("ImgBatteryState");
        imgTimeOut      = FindComponent <ImgTimeOut>("ImgTimeOut");

        settingPanel = FindComponent <SettingPanel>("SettingPanel");
    }
Ejemplo n.º 9
0
        private void MenueBtnClick(object sender, EventArgs e)
        {
            Button clickedbtn = sender as Button;

            switch (clickedbtn.Name)
            {
            case "DownloadBtn":
                DownloadPanel.BringToFront();
                selectedPanel = "DownloadPanel";
                break;

            case "DownloadingBtn":
                DownloadingPanel.BringToFront();
                selectedPanel = "DownloadingPanel";
                break;

            case "SettingBtn":
                SettingPanel.BringToFront();
                selectedPanel = "SettingPanel";
                break;
            }
        }
Ejemplo n.º 10
0
 public void ShowSettingPopup()
 {
     if (SettingPopup == null)
     {
         var header = new CenterPopupHeader();
         header.Padding          = new Thickness(20, 10, 20, 10);
         header.Title            = App._instance.App.GetLocalizationTextFromResource(LanguageName.Settings);
         header.CloseButtonStyle = App._instance.App.GetStyleFromResource(StyleName.PopupHeaderButtonStyle);
         header.TitleTextStyle   = App._instance.App.GetStyleFromResource(StyleName.SubtitleTextStyle);
         header.CloseIcon        = new FeatherIcon(FeatherSymbol.X)
         {
             FontSize = 13
         };
         var settingPanel = new SettingPanel();
         SettingPopup             = CenterPopup.CreatePopup(App._instance, header, settingPanel);
         header.CloseButtonClick += (_s, _e) =>
         {
             SettingPopup.Hide();
         };
         SettingPopup.Style = App._instance.App.GetStyleFromResource(StyleName.BasicCenterPopupStyle);
     }
     SettingPopup.Show();
 }
Ejemplo n.º 11
0
    void Awake()
    {
        AudioListener.volume = 0.0f;
        //DontDestroyOnLoad(this.gameObject);
        GameObject UIRoot = GameObject.Find("UI Root");
        

        AccountPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/AccountPanel") as GameObject);
        GameReadyPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GameReadyPanel") as GameObject);
        GameEndPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GameEndPanel") as GameObject);
        GuildManagementPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/GuildManagementPanel") as GameObject);
        HeadHunterCenterPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/HeadHunterCenterPanel") as GameObject);
        LobbyPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/LobbyPanel") as GameObject);
        StageListPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/StageListPanel") as GameObject);
        ShopPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/ShopPanel") as GameObject);
        MuhanPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/MuhanPanel") as GameObject);
        SettingPanel = NGUITools.AddChild(UIRoot, Resources.Load("Prefabs/UI/SettingPanel") as GameObject);
        

        Account = AccountPanel.GetComponent<AccountPanel>();
        GameReady = GameReadyPanel.GetComponent<GameReadyPanel>();
        GameEnd = GameEndPanel.GetComponent<GameEndPanel>();
        GuildManagement = GuildManagementPanel.GetComponent<GuildManagementPanel>();
        HeadHunterCenter = HeadHunterCenterPanel.GetComponent<HeadHunterCenterPanel>();
        Lobby = LobbyPanel.GetComponent<LobbyPanel>();
        StageList = StageListPanel.GetComponent<StageListPanel>();
        Shop = ShopPanel.GetComponent<ShopPanel>();
        Muhan = MuhanPanel.GetComponent<MuhanPanel>();
        Setting = SettingPanel.GetComponent<SettingPanel>();

        //savedAccountData = new ClientSaveData();
        //savedAccountData.Save();

       
        if (!windows.ContainsKey(ID.ACCOUNT_INFO))
        {
            windows.Add(ID.ACCOUNT_INFO, Account);
            windows.Add(ID.GAME_READY, GameReady);
            windows.Add(ID.GAME_END, GameEnd);
            windows.Add(ID.GUILD_MANAGEMENT, GuildManagement);
            windows.Add(ID.HEADHUNTER_CENTER, HeadHunterCenter);
            windows.Add(ID.LOBBY, Lobby);
            windows.Add(ID.STAGE_LIST, StageList);
            windows.Add(ID.STORE, Shop);
            windows.Add(ID.MUHAN, Muhan);
            windows.Add(ID.CONFIG, Setting);
        }
        //Initialize temp;;
        
        if (!GameManager.firstInit)
        {
            GameObject.Find("GameManager").GetComponent<GameManager>().InitParty();
            GameManager.firstInit = true;
        }
        GuildManagement.Init();
        
        GameReady.Hide();
        GameEnd.Hide();
        GuildManagement.Hide();
        HeadHunterCenter.Hide();
        Lobby.Hide();
        StageList.Hide();
        Shop.Hide();
        Muhan.Hide();
        Setting.Hide();
        
        if(GameManager.lobbyin)
        {
            if (GameManager.quest_num == 1000)
            {
                gotoMuhan();
                GameManager.lobbyin = false;
            }
            else
            {
                gotoStagelist();
                GameManager.lobbyin = false;
            }
        }
        else
        {
            //ChangeScene(ID.LOBBY);
            gotoLobby();
        }
        AndroidAdmob.Get().Init();
    }
Ejemplo n.º 12
0
 public void openSettingPanel()
 {
     SettingPanel.SetActive(true);
 }
Ejemplo n.º 13
0
 void SettingClick()
 {
     if (setting == null)
     {
         Facade.Instance.ShowPanel <SettingPanel>(Utility.UI.GetUIFullRelativePath("SettingPanel"), panel =>
                                                  { panel.gameObject.name = "SettingPanel"; panel.gameObject.SetActive(true); setting = panel; });
         return;
     }
     if (setting.gameObject.activeSelf)
     {
         setting.HidePanel();
     }
     else
     {
         setting.ShowPanel();
     }
 }
Ejemplo n.º 14
0
 public void OnClickLeftButton()
 {
     Close();
     SettingPanel settingPanel = Instantiate(settingPanelprefab, transform.parent).GetComponent <SettingPanel>();
 }
Ejemplo n.º 15
0
 public void ChangeText(string text, SettingPanel settingPanel)
 {
     settingPanel.SetText(text);
 }
Ejemplo n.º 16
0
 public void OnclickRightBT()
 {
     Close();
     SettingPanel settingPanel = Instantiate(settingPrefab, transform.parent).GetComponent <SettingPanel>();
 }
Ejemplo n.º 17
0
 public void onSetting()
 {
     SettingPanel.Load();
 }
Ejemplo n.º 18
0
 public void closeSettingPanel()
 {
     SettingPanel.SetActive(false);
 }
Ejemplo n.º 19
0
    public void WaveStartUp(string Wave)
    {
        switch (Wave)
        {
        case "normal":
            WaveStart(WaveState.NormalWave);
            break;

        case "hard":
            WaveStart(WaveState.HardWave);
            break;

        case "master":
            WaveStart(WaveState.MasterWave);
            break;
        }
        Debug.Log("ウェーブ起動");
        Initialize();
        //ウェーブ起動
        //
        BGMSource.clip = BGMs[1];
        BGMSource.Play();
        MainUI.SetActive(false);
        RankingUI.SetActive(false);
        DifficultyUI.SetActive(false);
        SettingPanel.SetActive(false);
        WaveUI.SetActive(true);

        RightPointer.enabled = false;
        LeftPointer.enabled  = false;

        Rightgun.ShotPos.GetChild(0).gameObject.SetActive(false);
        LeftGun.ShotPos.GetChild(0).gameObject.SetActive(false);

        if (_wavestate == WaveState.NormalWave)
        {
            Rightgun.SSwitch   = true;
            LeftGun.SSwitch    = true;
            RemainLife         = 3;
            BULLETTIME.Bswitch = true;
            lifetext.text      = "LIFE:" + RemainLife.ToString();
        }
        else if (_wavestate == WaveState.HardWave)
        {
            Rightgun.SSwitch   = true;
            LeftGun.SSwitch    = true;
            RemainLife         = 3;
            BULLETTIME.Bswitch = false;
            lifetext.text      = "LIFE:" + RemainLife.ToString();
        }
        else if (_wavestate == WaveState.MasterWave)
        {
            //Gunで盾オフにする
            Rightgun.SSwitch   = false;
            LeftGun.SSwitch    = false;
            RemainLife         = 1;
            BULLETTIME.Bswitch = false;
            lifetext.text      = "LIFE:" + RemainLife.ToString();
        }
        waveing = true;
        //UIいろいろ表示
    }
Ejemplo n.º 20
0
        protected override void OnClickListener(GameObject gob)
        {
            MenuBtn btnid   = (MenuBtn)UIEventListener.Get(gob).parameter;
            var     gdata   = App.GetGameData <FillpitGameData>();
            var     gserver = App.GetRServer <FillpitGameServer>();

            switch (btnid)
            {
            case MenuBtn.OpenMenu:
                Vector3 v = MenuBgTween.transform.localPosition;
                MoveMenuBg(v, new Vector3(-8, v.y, v.z));
                CloseBtn.SetActive(true);
                break;

            case MenuBtn.BackBtn:
                bool isPlayed    = gdata.IsPlayed;
                bool isRoomOwner = gdata.IsRoomOwner;

                if (!gdata.IsRoomGame)
                {
                    if (CouldOut())
                    {
                        YxMessageBox.Show(new YxMessageBoxData
                        {
                            Msg      = "您确定要退出游戏吗?",
                            BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
                            Listener = (box, btnName) =>
                            {
                                if (btnName == YxMessageBox.BtnLeft)
                                {
                                    if (CouldOut())
                                    {
                                        App.QuitGame();
                                    }
                                }
                            }
                        });
                    }
                    return;
                }

                if (isPlayed)
                {
                    YxMessageBox.Show(new YxMessageBoxData()
                    {
                        Msg      = "确定要发起投票,解散房间么?",
                        BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
                        Listener = (box, btnName) =>
                        {
                            if (btnName == YxMessageBox.BtnLeft)
                            {
                                gserver.SendHandsUp(2);      //房间游戏已开始,发起投票
                            }
                        }
                    });
                }
                else if (isRoomOwner)
                {
                    //房卡游戏没有开始,房主解散房间
                    YxMessageBox.Show(new YxMessageBoxData()
                    {
                        Msg      = "确定要解散房间吗?",
                        Listener = (box, btnName) =>
                        {
                            if (btnName == YxMessageBox.BtnLeft)
                            {
                                if (CouldOut())
                                {
                                    IRequest req = new ExtensionRequest("dissolve", new SFSObject());
                                    App.GetRServer <FillpitGameServer>().SendRequest(req);
                                }
                            }
                        },
                        IsTopShow = true,
                        BtnStyle  = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle
                    });
                }
                else
                {
                    if (CouldOut())
                    {
                        App.QuitGame();
                    }
                }

                CloseMenu();
                break;


            case MenuBtn.ChangeBtn:

                if (CouldOut())
                {
                    foreach (var yxBaseGamePlayer in gdata.PlayerList)
                    {
                        var player = (PlayerPanel)yxBaseGamePlayer;
                        player.Reset();
                        player.gameObject.SetActive(false);
                    }

                    gserver.ChangeRoom();
                    YxWindowManager.ShowWaitFor();
                }
                else
                {
                    YxDebug.Log("正在游戏中,不能更换房间!");
                    YxMessageBox.Show(new YxMessageBoxData()
                    {
                        Msg       = "正在游戏中,不能更换房间!",
                        IsTopShow = true,
                    });
                }
                CloseMenu();
                break;

            case MenuBtn.HelpBtn:         //显示牌类按钮
                if (HelpPanel != null)
                {
                    HelpPanel.SetActive(true);
                }
                CloseMenu();
                break;

            case MenuBtn.CloseBtn:
                CloseMenu();
                break;

            case MenuBtn.SettingBtn:
                SettingPanel.SetActive(true);
                CloseMenu();
                break;

            case MenuBtn.DismissRoomBtn:

                if (gdata.IsRoomGame && (gdata.IsPlayed || gdata.IsGameing))
                {
                    YxMessageBox.Show(new YxMessageBoxData
                    {
                        Msg      = "确定要发起投票,解散房间么?",
                        BtnStyle = YxMessageBox.LeftBtnStyle | YxMessageBox.RightBtnStyle,
                        Listener = (box, btnName) =>
                        {
                            if (btnName == YxMessageBox.BtnRight)
                            {
                                gserver.SendHandsUp(2);
                            }
                        },
                    });
                }
                CloseMenu();

                break;
            }
        }
Ejemplo n.º 21
0
    private void Start()
    {
        //    Scores =  new Dictionary<int, string>
        //{
        //    {100,"AAA"},
        //    {200,"BBB"},
        //    {300,"CCC"},
        //    {400,"DDD"},
        //    {500,"EEE"},
        //    {600,"FFF"},
        //    {700,"GGG"},
        //    {800,"HHH"},
        //    {900,"III"},
        //    {000,"JJJ"},
        //};
        BGMSource.clip = BGMs[0];
        BGMSource.Play();

        LeftPointer.enabled  = true;
        RightPointer.enabled = true;

        //for(int i = 0; i < Lasers.Capacity; i++)
        //{
        //    Lasers[i].gameObject.SetActive(true);
        //}

        RightControllermodel.SetActive(false);
        LeftControllermodel.SetActive(false);
        MainUI.SetActive(true);
        RankingUI.SetActive(true);
        DifficultyUI.SetActive(false);
        SettingPanel.SetActive(false);
        WaveUI.SetActive(false);
        NameInputUI.SetActive(false);
        WaveUI.SetActive(false);

        Rightgun.SSwitch = true;
        LeftGun.SSwitch  = true;

        BULLETTIME.Bswitch = false;
        //Rightgun.ShotPos.GetChild(0).gameObject.SetActive(true);
        //LeftGun.ShotPos.GetChild(0).gameObject.SetActive(true);
        Load();

        Entity_Sheet1.sheets[0].list.Sort((a, b) => a.Score + b.Score);
        foreach (Entity_Sheet1.Sheet localdatasheet in Entity_Sheet1.sheets)
        {
            int i = 0;
            if (localdatasheet.list.Count == 0)
            {
                for (int num = 0; num < 10; num++)
                {
                    NamesText[num].text  = "AAA";
                    Modestext[num].text  = "normal";
                    Scorestext[num].text = "0";
                }
                break;
            }
            foreach (Entity_Sheet1.Param localdataparam in localdatasheet.list)
            {
                NamesText[i].text  = localdataparam.Name;
                Modestext[i].text  = localdataparam.Mode;
                Scorestext[i].text = localdataparam.Score.ToString();
                if (i == 9)
                {
                    break;
                }
                i++;
            }
        }
    }