예제 #1
0
    // Update is called once per frame
    void Update()
    {
        if (doOnce == false)
        {
            if (sunPower.fillAmount >= 1f)
            {
                StartCoroutine(TypeTwo());
                textDisplay.text = "";
                dialogue.SetActive(true);
                buttonTwo.SetActive(true);
                doOnce = true;
                SunBeam sunBeam = theSun.GetComponent <SunBeam>();
                sunBeam.enabled = false;
                SunWander sunWander = theSun.GetComponent <SunWander>();
                sunWander.enabled = false;
            }
        }

        if (textDisplay.text == sentences[index] && buttonHider == false)
        {
            button.SetActive(true);
        }

        if (textDisplay.text == deathsentences[deathindex])
        {
            buttonTwo.SetActive(true);
        }
    }
예제 #2
0
    // Start is called before the first frame update
    void Start()
    {
        StartCoroutine(Type());
        theSun = GameObject.Find("SunBossContainer");
        SunBeam sunBeam = theSun.GetComponent <SunBeam>();

        sunBeam.enabled = false;
        SunWander sunWander = theSun.GetComponent <SunWander>();

        sunWander.enabled = false;
        thePlayer         = GameObject.Find("FlightCharacter");
        thePlayer.GetComponent <Rigidbody2D>().isKinematic = true;
        PlayerController playerController = thePlayer.GetComponent <PlayerController>();

        playerController.enabled = false;

        doOnce = false;

        buttonHider = false;
    }
예제 #3
0
 public void NextSentence()
 {
     button.SetActive(false);
     if (index < sentences.Length - 1)
     {
         index++;
         textDisplay.text = "";
         StartCoroutine(Type());
     }
     else
     {
         SunBeam sunBeam = theSun.GetComponent <SunBeam>();
         sunBeam.enabled = true;
         SunWander sunWander = theSun.GetComponent <SunWander>();
         sunWander.enabled = true;
         button.SetActive(false);
         dialogue.SetActive(false);
         PlayerController playerController = thePlayer.GetComponent <PlayerController>();
         thePlayer.GetComponent <Rigidbody2D>().isKinematic = false;
         playerController.enabled = true;
         buttonHider = true;
     }
 }