Ejemplo n.º 1
0
    void OnCollisionEnter2D(Collision2D other)
    {
        if (other.collider.tag == "Player")
        {
            levelNav.ShowOptionsPanel("EndMsg", true, true, true);
            //Debug.Log("struck");
            //gameOver1.SetActive(true);
            //gameOver2.SetActive(true);
            // gameOver3.SetActive(true);

            //Added for testing to to load other scene and for level panel
            //loadscene.changemenuscene("SimpleMachinePrep");
            //optnPanel = GameObject.Find("LevelPanelContainer");
            //Animator animator1 = GameObject.Find("Canvas/LevelPanelContainer/OptionsPanel/LeverBtn").GetComponent<Animator>();
            //Debug.Log(optnPanel);
            //optnPanel.transform.GetChild(0).gameObject.SetActive(true);
            //optnPanel.transform.GetChild(0).GetChild(3).gameObject.SetActive(false);
            //optnPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent<Button>().interactable = false;
            //optnPanel.transform.GetChild(0).GetChild(0).gameObject.GetComponent<Animator>().enabled = false;
            //optnPanel.transform.GetChild(0).GetChild(1).gameObject.GetComponent<Button>().interactable = true;
            //Time.timeScale = 0f;
            // animator1.updateMode = AnimatorUpdateMode.UnscaledTime;
            //levelPanel.ShowObject();
        }
    }
Ejemplo n.º 2
0
 void ShowOptionsPanel()
 {
     levelNav.ShowOptionsPanel("EndMsg", true, true, true);
 }
Ejemplo n.º 3
0
 public void ShowRestartBtn()
 {
     //restartButton.SetActive(true);
     //levelNav.ShowPanel();
     levelNav.ShowOptionsPanel("EndMsg", true, true, true);
 }