private void OnEnable()
    {
        trigger = (DialoguePlayerTrigger)target;

        GetTarget    = new SerializedObject(trigger);
        blockName    = GetTarget.FindProperty("BlockToPlay");
        optionsIndex = GetTarget.FindProperty("optionsIndex");
    }
Exemple #2
0
    public void DisplayNewText(DialoguePlayerTrigger trigger)
    {
        // Find all triggers
        DialoguePlayerTrigger[] objects = FindObjectsOfType <DialoguePlayerTrigger>();

        // Force all of them to stop playing
        foreach (var item in objects)
        {
            item.StopDisplayingText();
        }

        // Have the trigger that called this function to display text
        trigger.StartDisplayingText();
    }