IEnumerator ShowStartPanel() { player.GetComponent <UnityStandardAssets.Characters.FirstPerson.RigidbodyFirstPersonController>().enabled = false; FindObjectOfType <shooting>().enabled = false; Debug.Log("Start Panel "); yield return(new WaitForSeconds(1f)); UI1.SetActive(true); yield return(new WaitForSeconds(2f)); UI1.SetActive(false); yield return(new WaitForSeconds(1f)); UI2.SetActive(true); yield return(new WaitForSeconds(2f)); UI2.SetActive(false); yield return(new WaitForSeconds(1f)); startp.Play("Base Layer.startpanelanim", 0, .3f); startpanel.SetActive(false); Debug.Log("Start Panel Over "); FindObjectOfType <shooting>().enabled = true; player.GetComponent <UnityStandardAssets.Characters.FirstPerson.RigidbodyFirstPersonController>().enabled = true; yield break; }
private void Update() { if (Input.GetKeyDown(KeyCode.Escape)) { UI1.SetActive(false); UI2.SetActive(false); } }
public void closer2() { UI2.SetActive(false); }