Dialogue - GameDevStudioUCSD/GardensGrow GitHub Wiki

Form

The Dialogue prefab acts as a container for the underlying dialogue implementation. The DialogueSystem script takes text files and injects the text into TextAssets that are connected to the DialogueBox prefab for display. Each segment of dialogue is marked with a separator (currently '\n'). The DialogueSystem script uses simple coroutine code to implement a smooth animation for propagating to text into the DialogueBox prefab.

Function

At the initial commit of this feature, there was a sample test added to the PlayerGirdObject script's Update function ("HACK" is in the comment description). This allows the tester to initiate text interaction by pressing the TAB button. Related: the initial implementation of the DialogueSystem script currently takes the TAB button as input for progressing the dialogue. Pressing TAB before the text completes propagation for a dialogue segment completes the text propagation for that segment immediately.