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); }
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); }
void Start() { SoundManager.instance.BgmApply(Bgm.RuleEditor); Panel2.SetActive(false); Panel3.SetActive(false); Panel4.SetActive(false); }
public void OpenPanel() { if (Panel != null) { bool isActive = Panel.activeSelf; Panel.SetActive(true); Panel2.SetActive(false); } }
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); } }
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 } }
/// <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); } }
// 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; }
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); }
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); } }
public void PanelChange2() { Panel2.SetActive(false); Panel3.SetActive(true); }