Esempio n. 1
0
 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);
     }
 }
Esempio n. 2
0
 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);
 }