Example #1
0
 private void Update()
 {
     if (EnemyObject == null)
     {
         if (!isCalledOnece)
         {
             Cursor.visible   = true;
             Cursor.lockState = CursorLockMode.None;
             ImgObject2.SetActive(true);
             nextbutton2.SetActive(true);
             Player.GetComponent <KotodamariScript>().enabled = false;
             Playercamera.Camera.GetComponent <PlayerController>().enabled = false;
             MenuUIObject.GetComponent <MenuController>().enabled          = false;
             HpBarUI.SetActive(false);
             ReticleUI.SetActive(false);
             NameText.SetActive(false);
             TalkText.SetActive(false);
             Exptext.SetActive(false);
             isCalledOnece = true;
         }
     }
     if (hpbar.hp > 4)
     {
         if (Apple == null && !isCalledOnce2)
         {
             EnemyObject2.SetActive(true);
             exptext.fontSize = 40;
             exptext.text     = ("おばけが襲ってきた!\n\n倒そう!");
             isCalledOnce2    = true;
         }
     }
     if (isCalledOnce2)
     {
         if (EnemyObject2 == null)
         {
             if (!isCalledOnce3)
             {
                 StartCoroutine("TutorialEnd");
                 isCalledOnce3 = true;
             }
         }
     }
 }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        kotodama = Player.GetComponent <KotodamariScript>();
        Player.GetComponent <KotodamariScript>().enabled = false;
        Playercamera = Camera.GetComponent <PlayerController>();
        Playercamera.Camera.GetComponent <PlayerController>().enabled = false;
        menuController = GetComponent <MenuController>();
        MenuUIObject.GetComponent <MenuController>().enabled = false;
        hpbar          = Player.GetComponent <PlayerHPBar2>();
        fadeController = FadePanel.GetComponent <FadeController>();
        hpbar.hp       = 4;
        HpBarUI.SetActive(false);
        ReticleUI.SetActive(false);

        Cursor.visible   = true;
        Cursor.lockState = CursorLockMode.None;
        StartCoroutine("Cotest");
        EnemyObject2.SetActive(false);
    }