예제 #1
0
        private void InitializeFrontEndUI()
        {
            try
            {
                //Create Home UI
                log.Info("Home UI is set ");
                homeUI = new HomeUI(this);
                this.Controls.Add(homeUI);
                homeUI.setVisible();

                //Create Game UI
                log.Info("Game UI is set ");
                gameUI = new GameUI(this);
                this.Controls.Add(gameUI);


                //Create Result UI
                log.Info("Result UI is set");
                resultUI = new ResultUI(this);
                this.Controls.Add(resultUI);
            } catch (Exception ex)
            {
                MetroMessageBox.Show(this, String.Format("Error : {0}", ex.Message), "", MessageBoxButtons.OK, MessageBoxIcon.Error, 150);

                log.Info(String.Format("Error : {0}", ex.Message));
            }
        }
예제 #2
0
 public void WaveClear()
 {
     BGMSource.clip = BGMs[0];
     BGMSource.Play();
     for (int i = 0; i < this.SpawnObject.transform.childCount; i++)
     {
         Destroy(this.SpawnObject.transform.GetChild(i).gameObject);
     }
     for (int i = 0; i < this.ShotedObjects.transform.childCount; i++)
     {
         Destroy(this.ShotedObjects.transform.GetChild(i).gameObject);
     }
     ScoreCalculation();
     if (RemainLife == 0)
     {
         SESource.PlayOneShot(GameOverSound);
         ResultUI.SetActive(true);
     }
     else
     {
         SESource.PlayOneShot(ClearSound);
         ResultUI.SetActive(true);
     }
     WaveUI.SetActive(false);
     RightPointer.enabled = true;
     LeftPointer.enabled  = true;
     Rightgun.ShotPos.GetChild(0).gameObject.SetActive(true);
     LeftGun.ShotPos.GetChild(0).gameObject.SetActive(true);
 }
예제 #3
0
파일: DataWorker.cs 프로젝트: it262/Cubreak
 public void exclusion(string id)
 {
     if (players.ContainsKey(id))
     {
         if (id.Equals(me.GetComponent <PlayerScript>().pd.id))
         {
             //CameraController.Instance.transform.parent = startCamerapos.transform;
             //Camera.main.transform.parent = null;
             watching = true;
             CameraController.Instance.transform.parent = InstanceStage.GetComponent <Stage>().CamPos.transform;
             ResultUI.GetComponent <ResultIndicater>().setRanks(players.Count.ToString());
             ResultUI.GetComponent <ResultIndicater>().setScore(300 - players.Count * 50);
             ResultUI.GetComponent <Animator>().SetBool("On", true);
             Cursor.SetCursor(null, Vector2.zero, CursorMode.Auto);
         }
         else if (players.Count == 2)
         {
             watching = true;
             CameraController.Instance.transform.parent = InstanceStage.GetComponent <Stage>().CamPos.transform;
             ResultUI.GetComponent <ResultIndicater>().setRanks("1");
             ResultUI.GetComponent <ResultIndicater>().setScore(300);
             ResultUI.GetComponent <Animator>().SetBool("On", true);
         }
         Destroy(players [id]);
         players.Remove(id);
     }
 }
예제 #4
0
파일: DataWorker.cs 프로젝트: it262/Cubreak
 void MenuSetting()
 {
     cc.transform.parent = cc.cam_menu1_pos.transform;
     ResultUI.GetComponent <Animator>().SetBool("On", false);
     Enhanced.SetActive(false);
     //cc.transform.parent = titleCamerapos.transform;
     Destroy(InstanceStage);
     InstanceObsCon.GetComponent <ObstacleControllSync> ().DestroyAll();
     Destroy(InstanceObsCon);
     foreach (GameObject data in players.Values)
     {
         Destroy(data);
     }
     DataClear();
     //MenuStage.SetActive(true);
     //CameraController.Instance.transform.parent = null;
     //MenuStage.GetComponent<Animator>().SetBool("On", false);
     //TitleCamera.SetActive (true);
     //TitleText.SetActive (true);
     TitleText.GetComponent <TitleEffect>().setActive_script(false);
     //sphereController.SetActive (true);
     //cubesController.SetActive (true);
     //cubesController.GetComponent<cubesController> ().CubeSetting ();
     //Menu.SetActive (true);
 }
예제 #5
0
 void Awake()
 {
     if (_instance != null)
     {
         Destroy(this.gameObject);
     }
     _instance = this;
 }
예제 #6
0
 public void Init()
 {
     MyInvestigateUI = transform.FindChild("Investigate").GetComponent <InvestigateUI>();
     MyInvestigateUI.Init();
     MyResultUI = transform.FindChild("Result").GetComponent <ResultUI>();
     MyResultUI.Init();
     MyAccidentUI = transform.FindChild("Accident").GetComponent <AccidentUI>();
     MyAccidentUI.Init();
     MyCampUI = transform.FindChild("Camp").GetComponent <CampUI>();
     MyCampUI.Init();
 }
예제 #7
0
 public void Init()
 {
     MyInvestigateUI = transform.FindChild("Investigate").GetComponent<InvestigateUI>();
     MyInvestigateUI.Init();
     MyResultUI = transform.FindChild("Result").GetComponent<ResultUI>();
     MyResultUI.Init();
     MyAccidentUI = transform.FindChild("Accident").GetComponent<AccidentUI>();
     MyAccidentUI.Init();
     MyCampUI = transform.FindChild("Camp").GetComponent<CampUI>();
     MyCampUI.Init();
 }
예제 #8
0
    //결과창 출력.
    void ShowResultUI()
    {
        ResultUI ui = UIManager.Instance.LoadPopupUI("ResultUI").GetComponent <ResultUI>();

        ui.Init(isGameResult, currentScore);

        if (DataManager.Instance.bestScore < currentScore)
        {
            DataManager.Instance.bestScore = currentScore;
            PlayerPrefs.SetInt("BestScore", currentScore);
        }
    }
예제 #9
0
    void StartResult()
    {
        ResultUI.Show();
        Score.HideUI();

        resultAudio.SetActive(true);

        //for (int i = 0; i < stageLevelManager.Length; i++)
        //{
        //    stageLevelManager[i].SetActive(false);
        //}
    }
예제 #10
0
    /// <summary>
    /// 初始化
    /// </summary>
    public void Init()
    {
        MyGameobject = gameObject;
        MyResult = this;

        //情境
        Go_Scenario = transform.FindChild("Scenario").gameObject;
        Text_Scenario = Go_Scenario.transform.FindChild("description").GetComponent<Text>();
        //回饋
        Go_Feedback = transform.FindChild("Feedback").gameObject;
        Text_Feedback = Go_Feedback.transform.FindChild("description").GetComponent<Text>();
        ShowResultUI(false);
    }
예제 #11
0
    /// <summary>
    /// 初始化
    /// </summary>
    public void Init()
    {
        MyGameobject = gameObject;
        MyResult     = this;

        //情境
        Go_Scenario   = transform.FindChild("Scenario").gameObject;
        Text_Scenario = Go_Scenario.transform.FindChild("description").GetComponent <Text>();
        //回饋
        Go_Feedback   = transform.FindChild("Feedback").gameObject;
        Text_Feedback = Go_Feedback.transform.FindChild("description").GetComponent <Text>();
        ShowResultUI(false);
    }
예제 #12
0
    // public method
    // link element component
    public void LinkComponentElement()
    {
        // link structure
        manager = GameObject.FindWithTag("GameLogic").GetComponent <GameManager>();

        // link element component
        storeUI      = transform.Find("StoreUI").gameObject;
        storeUILogic = storeUI.GetComponent <StoreUI>();
        storeUILogic.LinkComponentElement();

        storageUI      = transform.Find("StorageUI").gameObject;
        storageUILogic = storageUI.GetComponent <StorageUI>();

        storeCustomizingSet      = transform.Find("CustomizeUI").gameObject;
        storeCustomizingSetLogic = storeCustomizingSet.GetComponent <CustomizeUI>();
        storeCustomizingSetLogic.LinkComponentElement();

        createUI      = transform.Find("CreateUI").gameObject;
        createUILogic = createUI.GetComponent <CreateUI>();

        sellItemSettingUI      = transform.Find("SellItemSettingUI").gameObject;
        sellItemSettingUILogic = sellItemSettingUI.GetComponent <SellItemSettingUI>();

        furnitureMarketUI      = transform.Find("FurnitureMarketUI").gameObject;
        furnitureMarketUILogic = furnitureMarketUI.GetComponent <FurnitureMarketUI>();

        stageUI      = transform.Find("StageUI").gameObject;
        stageUILogic = stageUI.GetComponent <StageUI>();

        resultRewardUI      = transform.Find("ResultRewardUI").gameObject;
        resultRewardUILogic = resultRewardUI.GetComponent <ResultRewardUI>();

        resultUI      = transform.Find("ResultUI").gameObject;
        resultUILogic = resultUI.GetComponent <ResultUI>();

        chatSceneUI      = transform.Find("ChatScene").gameObject;
        chatSceneUILogic = chatSceneUI.GetComponent <ChatSceneUI>();

        characterCreateUI      = transform.Find("CharacterCreateUI").gameObject;
        characterCreateUILogic = characterCreateUI.GetComponent <CharacterCreateUI>();

        questUI      = transform.Find("QuestUI").gameObject;
        questUILogic = questUI.GetComponent <QuestUI>();
        questUILogic.LinkComponentElement();

        loadingScene = transform.Find("LoadingScene").gameObject;
    }
예제 #13
0
    //事件協程
    static IEnumerator EventCoroutine()
    {
        Go_Scenario.SetActive(true);
        yield return(new WaitForSeconds(1f));

        Go_Process.SetActive(true);
        yield return(new WaitForSeconds(2f));

        ShowAccidentUI(false);//隱藏結果UI
        if (Data.CheckPassEvent(FightScene.PCharaList))
        {
            ResultUI.CallResult(Data.PassResult);
        }
        else
        {
            ResultUI.CallResult(Data.FailResult);
        }
    }
예제 #14
0
 /// <summary>
 /// 確認按鈕被按下
 /// </summary>
 public void Click_Confirm()
 {
     ShowInvestigateUI(false);
     ResultUI.CallResult(Data.Result[Calculator.WeightIndexGetter(Data.Result, Data.ResultWeight)]);
 }
예제 #15
0
 void Awake()
 {
     instance = this;
 }
예제 #16
0
 public void MainMenuActive()
 {
     MainUI.SetActive(true);
     RankingUI.SetActive(true);
     ResultUI.SetActive(false);
 }