コード例 #1
0
 public void restartujeme()
 {
     DisableLayers();
     VrstvaHraj.SetActive(true);
     VrstvaScore.SetActive(true);
     ScoreText.text = 0.ToString();
     Hra.hrac.transform.position      = new Vector3(-5f, 2.5f, -1f);
     Hra.hracvcela.transform.position = new Vector3(-5f, 2.5f, -1f);
     hrac.gameObject.GetComponent <Rigidbody2D>().simulated = true;
     hrac_vcela_skript.gameObject.GetComponent <Rigidbody2D>().simulated = true;
     Hra.enabled = true;
     Hra.pozadie1.transform.position  = new Vector3(4f, 0f, 0f);
     Hra.pozadie2.transform.position  = new Vector3(30f, 0f, 0f);
     Hra.pozadie3.transform.position  = new Vector3(3f, 0f, 0f);
     Hra.pozadie4.transform.position  = new Vector3(25.89f, 0f, 0f);
     Hra.pozadie5.transform.position  = new Vector3(6f, 0f, 0f);
     Hra.pozadie6.transform.position  = new Vector3(34.23f, 0f, 0f);
     Hra.pozadie7.transform.position  = new Vector3(0.5f, 0f, 0f);
     Hra.pozadie8.transform.position  = new Vector3(17.82f, 0f, 0f);
     Hra.vzdialenostOdPoslednejPipeky = 0;
     Hra.posunutie   = 0;
     Hra.pocet_pipok = 0;
     Hra.score       = 0;
     foreach (GameObject pipeka in Hra.Pipeky)
     {
         Destroy(pipeka);
     }
     Hra.Pipeky.Clear();
 }
コード例 #2
0
 public void play_game()
 {
     DisableLayers();
     VrstvaHraj.SetActive(true);
     VrstvaScore.SetActive(true);
 }