// Way 3: Method Injection public void end(IChoiceHandler choiceHandler) { // For way 1 ChoiceHandler.Next(); // For way 2 _choiceHandler.Next(); // For way 3 choiceHandler.Next(); }
public Example(IChoiceHandler handler) { handler.next(); }
public DialogueSuper(IChoiceHandler choiceHandler) { _choiceHandler = choiceHandler; }
public DialogueSuper(IChoiceHandler ch) { this.ch = ch; }