Esempio n. 1
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape) && isBlock == false)
     {
         switch (scene.name)
         {
         case "Game":
             // 활성화된 팝업이 없는 경우 일시정지창 팝업
             if (PopupContainer.GetActivatedPopup() == null)
             {
                 PopupContainer.CreatePopup(PopupType.PausePopup).Init();
             }
             // 활성화된 팝업이 존재하는 경우 팝업 종료
             else
             {
                 BasePopup   popup       = PopupContainer.GetActivatedPopup();
                 ResultPopup resultPopup = popup as ResultPopup;
                 if (resultPopup == null)
                 {
                     popup.Close();
                 }
             }
             break;
         }
     }
 }
Esempio n. 2
0
    private ResultPopup MakePopup(PlayerGame game_)
    {
        GameObject  resultPopupGameObj = Instantiate(gameObject);
        ResultPopup resultPopup        = resultPopupGameObj.GetComponent <ResultPopup>();

        resultPopup.game = game_;

        CanvasExtensions.Add(resultPopupGameObj);
        //resultPopupGameObj.GetComponent<RectTransform>().SetParent();

        return(resultPopup);
    }
Esempio n. 3
0
    public void TiePopup(PlayerGame game_)
    {
        ResultPopup resultPopup = MakePopup(game_);

        resultPopup.TieSetup();
    }
Esempio n. 4
0
    public void WinPopup(PlayerGame game_, SymbolDescriptor winner)
    {
        ResultPopup resultPopup = MakePopup(game_);

        resultPopup.WinSetup(winner);
    }
 void Awake()
 {
     _turn        = FindObjectOfType <Turn>();
     _pausePopup  = FindObjectOfType <PausePopup>();
     _resultPopup = FindObjectOfType <ResultPopup>();
 }