public void TriggerActions(List <DialogueAction> actions) { actions.ForEach(action => { switch (action.actionKey) { /* Note: At present you can skip ahead if in the right scene, may want * to prevent this by adding 'must happen before' restrictions on * chat nodes */ case DialogueConsts.CANCEL_CONVERSATION: OnCancelConversation?.Invoke(); break; case DialogueConsts.ADD_KEY_ITEM: OnAddItem?.Invoke(action.actionValue); break; case DialogueConsts.OPEN_SHOP: OnOpenShop?.Invoke(action.actionValue); break; case DialogueConsts.ADD_LOG_ENTRY: OnAddLogEntry?.Invoke(action.actionValue); break; case DialogueConsts.INVALIDATE_CONVERSATION: dialogueService.SetValidationOnConvo(action.actionValue, false); break; case DialogueConsts.VALIDATE_CONVERSATION: dialogueService.SetValidationOnConvo(action.actionValue, true); break; case DialogueConsts.TEST_ACTION: Log("This is a test action, it does nothing special."); break; } }); }
private void OnClickShop() { OnOpenShop?.Invoke(); }
public static void OpenShop() => OnOpenShop.Invoke();