示例#1
0
 public void GoAnotherCamera()
 {
     if (flag == false)
     {
         camera1.SetActive(false);
         camera2.SetActive(true);
         flag = true;
         Debug.Log("Переключение на камеру 2");
         btLeftRotate.SetActive(false);
         btRightRotate.SetActive(false);
         Panel1.SetActive(false);
         Panel2.SetActive(false);
     }
     else
     {
         camera2.SetActive(false);
         camera1.SetActive(true);
         flag = false;
         Debug.Log("Переключение на камеру 1");
         btLeftRotate.SetActive(true);
         btRightRotate.SetActive(true);
         Panel1.SetActive(true);
         Panel2.SetActive(true);
     }
 }
    private void OnDisconnectedFromPhoton()
    {
        Debug.Log("Disconnected Lobby");


        Panel2.SetActive(false);
    }
示例#3
0
 public void MD()
 {
     if (Mathf.Abs(T2.rectTransform.localPosition.x - _timeFill) < T2.rectTransform.rect.width / 2)
     {
         Score += 1;
     }
     else
     {
         if (Score > 0)
         {
             Score -= 1;
         }
     }
     ScoreText.text = Score.ToString();
     Tryings       -= 1;
     if (Tryings == 0)
     {
         un1.gameObject.SetActive(false);
         if (Score > 4)
         {
             Panel1.SetActive(true);
         }
         else
         {
             Panel2.SetActive(true);
         }
     }
     _timeFill = T1.rectTransform.position.x + T1.rectTransform.rect.width / 2;
     _timeBar.rectTransform.localPosition = new Vector2(_timeFill, _timeBar.rectTransform.localPosition.y);
     T2.rectTransform.localPosition       = new Vector2(Random.Range(-150, 150), T2.rectTransform.localPosition.y);
     T2.rectTransform.sizeDelta          -= new Vector2(Random.Range(T2.rectTransform.rect.width / 40, T2.rectTransform.rect.width / 5), 0);
 }
    private void OnJoinedLobby()
    {
        Debug.Log("On Joined Lobby");

        Panel1.SetActive(false);
        Panel2.SetActive(true);
    }
示例#5
0
 void Start()
 {
     SoundManager.instance.BgmApply(Bgm.RuleEditor);
     Panel2.SetActive(false);
     Panel3.SetActive(false);
     Panel4.SetActive(false);
 }
示例#6
0
 public void OpenPanel()
 {
     if (Panel != null)
     {
         bool isActive = Panel.activeSelf;
         Panel.SetActive(true);
         Panel2.SetActive(false);
     }
 }
示例#7
0
 public void instanciar()
 {
     instanciado = true;
     SeInstancio = 1;
     PlayerPrefs.SetInt("instanciado", SeInstancio);
     PlayerPrefs.SetInt("Avatar", AvatarSelect);
     PlayerPrefs.SetString("NombreUser", getNameUser.text);
     Panel.SetActive(false);
     Panel2.SetActive(false);
 }
    public void changePanel()
    {
        bool panelActive  = Panel.activeSelf;
        bool panel2Active = Panel2.activeSelf;

        if (Panel != null && Panel2 != null)
        {
            Panel.SetActive(!panelActive);
            Panel2.SetActive(!panel2Active);
        }
    }
示例#9
0
 private void Update()                //Checks every frame
 {
     if (Input.GetMouseButtonDown(1)) //Check if Right Click is pressed
     {
         Panel.SetActive(false);
         Panel2.SetActive(false);     //Set panels to not active
         AttackB.interactable = true; //Enable Attack Button
         CastB.interactable   = true; //Enable Cast Button
         FuriteB.interactable = true; //Enable Furite Button
         RunB.interactable    = true; //Enable Run Button
     }
 }
示例#10
0
 /// <summary>
 /// Sets interface screens according to given input
 /// </summary>
 /// <param name="step"></param>
 public void SetInterface(int step)
 {
     if (step == 0)
     {
         Intro.SetActive(true);
         Intro.SetActive(true);
         CloseBtn.SetActive(false);
         Panel1.SetActive(false);
         Panel2.SetActive(false);
         Panel3.SetActive(false);
         PanelOver.SetActive(false);
     }
     else if (step == 1)
     {
         Intro.SetActive(false);
         CloseBtn.SetActive(true);
         Panel1.SetActive(true);
         Settings1.SetActive(false);
         Panel2.SetActive(false);
         Panel3.SetActive(false);
         PanelOver.SetActive(false);
     }
     else if (step == 2)
     {
         Intro.SetActive(false);
         CloseBtn.SetActive(true);
         Panel1.SetActive(false);
         Panel2.SetActive(true);
         Settings2.SetActive(false);
         Panel3.SetActive(false);
         PanelOver.SetActive(false);
     }
     else if (step == 3)
     {
         Intro.SetActive(false);
         CloseBtn.SetActive(true);
         Panel1.SetActive(false);
         Panel2.SetActive(false);
         Panel3.SetActive(true);
         PanelOver.SetActive(false);
     }
     else if (step == 4)
     {
         Intro.SetActive(false);
         CloseBtn.SetActive(true);
         Panel1.SetActive(false);
         Panel2.SetActive(false);
         Panel3.SetActive(false);
         PanelOver.SetActive(true);
     }
 }
示例#11
0
 // Use this for initialization
 void Start()
 {
     FadeImage.enabled = false;
     Mainpanel.SetActive(true);
     Panel1.SetActive(false);
     Panel2.SetActive(false);
     Panel3.SetActive(false);
     Panel4.SetActive(false);
     Panel5.SetActive(false);
     Gamepanel.SetActive(false);
     Resultpanel.SetActive(false);
     prevpanel   = Mainpanel;
     PanelNumber = 0;
     gamemode    = false;
     Timer       = false;
 }
示例#12
0
    void Start()
    {
        Time.timeScale = 1;
        anim           = Panel2.GetComponent <Animator>();
        anim.enabled   = false;


        Panel.SetActive(true);
        Panel2.SetActive(true);
        rect  = Panel.GetComponent <RectTransform>();
        rect2 = Panel2.GetComponent <RectTransform>();


        SetRect(rect, -10, 1318, 10, -1318);
        SetRect(rect2, -2100, 10, 2100, 10);
    }
示例#13
0
 private void IsLongDistance()
 {
     if ((MovedBar.position.x < -2f) || (MovedBar.position.x > 1.5f))
     {
         speed = 0;
         IsEnd = true;
         GorB  = false;
         Panel.SetActive(true);
     }
     if (TimerWashing.NumTime == 0)
     {
         speed = 0;
         IsEnd = true;
         GorB  = true;
         Panel2.SetActive(true);
     }
 }
示例#14
0
 public void PanelChange2()
 {
     Panel2.SetActive(false);
     Panel3.SetActive(true);
 }