void Update() { if (phaseControl.GetCurrentPhase() == phaseRequired && nameChanged == false) { GetComponent <TextMesh>().text = newDescriptionName; nameChanged = true; } }
void Update() { if (phaseControl.GetCurrentPhase() == phaseRequired && changeHappened == false) { oldCollider.enabled = !oldCollider.enabled; newCollider.enabled = !newCollider.enabled; changeHappened = true; } }
void Update() { if (phaseControl.GetCurrentPhase() == collarAndOstrichPhase && collarAndOstrich == false) { OstrichRenderer.sprite = OstrichOut; OstrichBoxCollider.enabled = false; collarAnimator.SetBool("isOpen", true); collarAudio.Play(); collarAndOstrich = true; } }
void Awake() { continueButton.SetActive(false); if (isOptionsDialogue) { option1Button.SetActive(false); option2Button.SetActive(false); } sentences = new Queue <string>(); playerController = player.GetComponent <PlayerPlatformerController>(); currentPhase = phaseControl.GetCurrentPhase(); }
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); }
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); } }