Пример #1
0
 void Update()
 {
     if (phaseControl.GetCurrentPhase() == phaseRequired && nameChanged == false)
     {
         GetComponent <TextMesh>().text = newDescriptionName;
         nameChanged = true;
     }
 }
Пример #2
0
 void Update()
 {
     if (phaseControl.GetCurrentPhase() == phaseRequired && changeHappened == false)
     {
         oldCollider.enabled = !oldCollider.enabled;
         newCollider.enabled = !newCollider.enabled;
         changeHappened      = true;
     }
 }
Пример #3
0
    void Update()
    {
        if (phaseControl.GetCurrentPhase() == collarAndOstrichPhase && collarAndOstrich == false)
        {
            OstrichRenderer.sprite     = OstrichOut;
            OstrichBoxCollider.enabled = false;
            collarAnimator.SetBool("isOpen", true);
            collarAudio.Play();

            collarAndOstrich = true;
        }
    }
Пример #4
0
    void Awake()
    {
        continueButton.SetActive(false);
        if (isOptionsDialogue)
        {
            option1Button.SetActive(false);
            option2Button.SetActive(false);
        }

        sentences        = new Queue <string>();
        playerController = player.GetComponent <PlayerPlatformerController>();

        currentPhase = phaseControl.GetCurrentPhase();
    }
Пример #5
0
    public bool CanTriggerDialogue()
    {
        if (dialogue.phaseRequired == null)
        {
            Debug.Log("need to specify a required phase in the inspector of the relevant Discussion");
        }

        if (!dialogue.isStatic && phaseControl.GetCurrentPhase() == dialogue.phaseRequired) //Trigger an actual dialogue
        {
            return(true);
        }
        else if (dialogue.isStatic && (phaseControl.GetCurrentPhaseNumber() >= dialogue.phaseNumber)) //Trigger the static dialogue
        {
            return(true);
        }

        return(false);
    }
Пример #6
0
 void OnTriggerStay2D()
 {
     if (phaseControl.GetCurrentPhase() == scarecrowFightPhase && canHit == false)
     {
         ai.setEnable(true);
         canHit = true;
     }
     if (ai.isDead() && isDead == false)
     {
         animator.SetBool("isBroken", true);
         collider.enabled = false;
         isDead           = true;
         ai.setEnable(false);
         trigercollider.enabled = false;
         examine.SetActive(false);
     }
     if (ai.isDamaged())
     {
         animator.SetBool("gotHit", true);
     }
 }