예제 #1
0
 private void ClearAroundBoxesColor()
 {
     if (LeftTopBox != null)
     {
         LeftTopBox.RestoreColor();
     }
     if (LeftBottomBox != null)
     {
         LeftBottomBox.RestoreColor();
     }
     if (LeftBox != null)
     {
         LeftBox.RestoreColor();
     }
     if (TopBox != null)
     {
         TopBox.RestoreColor();
     }
     if (RightTopBox != null)
     {
         RightTopBox.RestoreColor();
     }
     if (RightBottomBox != null)
     {
         RightBottomBox.RestoreColor();
     }
     if (RightBox != null)
     {
         RightBox.RestoreColor();
     }
     if (BottomBox != null)
     {
         BottomBox.RestoreColor();
     }
 }
예제 #2
0
 private void ColorAroundBoxes()
 {
     if (LeftTopBox != null)
     {
         if (LeftTopBox.Opened == false)
         {
             LeftTopBox.SetRLClickColor();
         }
     }
     if (LeftBottomBox != null)
     {
         if (LeftBottomBox.Opened == false)
         {
             LeftBottomBox.SetRLClickColor();
         }
     }
     if (LeftBox != null)
     {
         if (LeftBox.Opened == false)
         {
             LeftBox.SetRLClickColor();
         }
     }
     if (TopBox != null)
     {
         if (TopBox.Opened == false)
         {
             TopBox.SetRLClickColor();
         }
     }
     if (RightTopBox != null)
     {
         if (RightTopBox.Opened == false)
         {
             RightTopBox.SetRLClickColor();
         }
     }
     if (RightBottomBox != null)
     {
         if (RightBottomBox.Opened == false)
         {
             RightBottomBox.SetRLClickColor();
         }
     }
     if (RightBox != null)
     {
         if (RightBox.Opened == false)
         {
             RightBox.SetRLClickColor();
         }
     }
     if (BottomBox != null)
     {
         if (BottomBox.Opened == false)
         {
             BottomBox.SetRLClickColor();
         }
     }
 }
예제 #3
0
 public void InitialPanel()
 {
     CountOfLevel = 0;
     Panel.transform.Find("Text").GetComponent <TextMesh>().text         = "Wait";
     LeftBox.transform.Find("LeftText").GetComponent <TextMesh>().text   = "";
     RightBox.transform.Find("RightText").GetComponent <TextMesh>().text = "";
     LeftBox.GetComponent <Renderer>().material.DisableKeyword("_EMISSION");
     RightBox.GetComponent <Renderer>().material.DisableKeyword("_EMISSION");
 }
예제 #4
0
    public void LookedRight()   //오른쪽 상자를 보면
    {
        if (IsRight == false)
        {
            LeftBox.GetComponent <Renderer>().material.DisableKeyword("_EMISSION");
            RightBox.GetComponent <Renderer>().material.EnableKeyword("_EMISSION");

            Timer.transform.Find("polySurface1").GetComponent <Renderer>().material = mats[0];

            SoundManager.instance.PlayButtonSelect();
            IsLeft  = false;
            IsRight = true;
        }
    }
예제 #5
0
    public void SetQuiz1()      //문제 출제 최초 출발 함수 (Start함수에서 함수호출하면서 일단 최초로 시작됨)
    {
        if (SceneManager.GetActiveScene().name != "Game")
        {
            return;                                                              //조기리턴, 버그로 메뉴인 상태에서 함수 호출을 막기위한 미연의 방지
        }
        RightBox.GetComponent <Renderer>().material.DisableKeyword("_EMISSION"); //새로운 문제를 위해 두 상자를 꺼준다
        LeftBox.GetComponent <Renderer>().material.DisableKeyword("_EMISSION");

        Timer.transform.Find("polySurface1").GetComponent <Renderer>().material = mats[2]; //새로운 문제를 위해 타이머 색을 없앤다

        TimerAnimation.SetBool("SetQuiz", true);                                           //타이머 애니메이션 시작
        IsProgress = true;

        // if(first == false)     //씬 이동후 최초 호출이 아니면
        Player.GetComponent <Raycast>().hittime = 0.0f;

        IsLeft  = false;
        IsRight = false;

        this.GetComponent <HandleTextFile>().SetQuiz2();     //파일입출력을 위해 호출
    }
예제 #6
0
 public void Focus()
 {
     RightBox.Focus(FocusState.Programmatic);
 }
예제 #7
0
        internal void OpenAllWithrRLClick()
        {
            if (this.TotalMines != GetFlagsCountAround())
            {
                return;
            }

            if (LeftTopBox != null)
            {
                if (LeftTopBox.Checked == false)
                {
                    if (LeftTopBox.HasMine && !LeftTopBox.HasFlag)
                    {
                        Game.YouLost(LeftTopBox);
                        return;
                    }
                    LeftTopBox.OpenAll();
                }
            }
            if (LeftBottomBox != null)
            {
                if (LeftBottomBox.Checked == false)
                {
                    if (LeftBottomBox.HasMine && !LeftBottomBox.HasFlag)
                    {
                        Game.YouLost(LeftBottomBox);
                        return;
                    }
                    LeftBottomBox.OpenAll();
                }
            }
            if (LeftBox != null)
            {
                if (LeftBox.Checked == false)
                {
                    if (LeftBox.HasMine && !LeftBox.HasFlag)
                    {
                        Game.YouLost(LeftBox);
                        return;
                    }
                    LeftBox.OpenAll();
                }
            }
            if (TopBox != null)
            {
                if (TopBox.Checked == false)
                {
                    if (TopBox.HasMine && !TopBox.HasFlag)
                    {
                        Game.YouLost(TopBox);
                        return;
                    }
                    TopBox.OpenAll();
                }
            }
            if (RightTopBox != null)
            {
                if (RightTopBox.Checked == false)
                {
                    if (RightTopBox.HasMine && !RightTopBox.HasFlag)
                    {
                        Game.YouLost(RightTopBox);
                        return;
                    }
                    RightTopBox.OpenAll();
                }
            }
            if (RightBottomBox != null)
            {
                if (RightBottomBox.Checked == false)
                {
                    if (RightBottomBox.HasMine && !RightBottomBox.HasFlag)
                    {
                        Game.YouLost(RightBottomBox);
                        return;
                    }
                    RightBottomBox.OpenAll();
                }
            }
            if (RightBox != null)
            {
                if (RightBox.Checked == false)
                {
                    if (RightBox.HasMine && !RightBox.HasFlag)
                    {
                        Game.YouLost(RightBox);
                        return;
                    }
                    RightBox.OpenAll();
                }
            }
            if (BottomBox != null)
            {
                if (BottomBox.Checked == false)
                {
                    if (BottomBox.HasMine && !BottomBox.HasFlag)
                    {
                        Game.YouLost(BottomBox);
                        return;
                    }
                    BottomBox.OpenAll();
                }
            }
        }
예제 #8
0
 public void OpenAll()
 {
     this.Open();
     this.Checked = true;
     if (this.TotalMines == 0)
     {
         if (LeftTopBox != null)
         {
             if (LeftTopBox.Checked == false)
             {
                 LeftTopBox.OpenAll();
             }
         }
         if (LeftBottomBox != null)
         {
             if (LeftBottomBox.Checked == false)
             {
                 LeftBottomBox.OpenAll();
             }
         }
         if (LeftBox != null)
         {
             if (LeftBox.Checked == false)
             {
                 LeftBox.OpenAll();
             }
         }
         if (TopBox != null)
         {
             if (TopBox.Checked == false)
             {
                 TopBox.OpenAll();
             }
         }
         if (RightTopBox != null)
         {
             if (RightTopBox.Checked == false)
             {
                 RightTopBox.OpenAll();
             }
         }
         if (RightBottomBox != null)
         {
             if (RightBottomBox.Checked == false)
             {
                 RightBottomBox.OpenAll();
             }
         }
         if (RightBox != null)
         {
             if (RightBox.Checked == false)
             {
                 RightBox.OpenAll();
             }
         }
         if (BottomBox != null)
         {
             if (BottomBox.Checked == false)
             {
                 BottomBox.OpenAll();
             }
         }
     }
 }