public void StartSpeech(GameObject initiator) { if (showingText) { return; } if (randomizeTexts) { textIndex = Random.Range(0, texts.Length - 1); } if (initiator.CompareTag(playerTag)) { playerControl = initiator.GetComponent <PlayerControl>(); playerControl.freezeInput = true; speech.SetActive(true); showingText = true; skipUpdate = true; textAdvancer = initiator.GetComponent <TextAdvancer>(); DrawText(); } }
public void StartSpeech(GameObject initiator) { if (showingText) { return; } if (randomizeTexts) { textIndex = Random.Range(0, texts.Length - 1); } if (initiator.CompareTag(playerTag)) { playerControl = initiator.GetComponent<PlayerControl>(); playerControl.freezeInput = true; speech.SetActive(true); showingText = true; skipUpdate = true; textAdvancer = initiator.GetComponent<TextAdvancer>(); DrawText(); } }