Пример #1
0
        public static bool ChooseResponseTextPrefix(Response response, ref FinalResponseText __result)
        {
            DialogueEntry destinationEntry = response.destinationEntry;

            if (JanusNode.IsJanusNode(destinationEntry))
            {
                __result = JanusNode.HandleResponseText(response);
            }
            else if (WhiteCheckNode.IsWhiteCheckNode(destinationEntry))
            {
                __result = WhiteCheckNode.HandleResponseText(response);
            }
            else if (RedCheckNode.IsRedCheckNode(destinationEntry))
            {
                __result = RedCheckNode.HandleResponseText(response);
            }
            else if (PassiveNode.IsPassiveNode(destinationEntry))
            {
                __result = PassiveNode.HandleResponseText(response);
            }
            else if (CostOptionNode.IsCostOptionNode(destinationEntry))
            {
                __result = CostOptionNode.HandleResponseText(response);
            }
            else if (FakeCheckNode.IsFakeCheckNode(destinationEntry))
            {
                __result = FakeCheckNode.HandleResponseText(response);
            }
            else
            {
                string localizedTerm = LocalizationManager.GetLocalizedTerm(LocalizationUtils.GetDialogueEntryLocalizationTerm(destinationEntry));
                string responseText  = (localizedTerm == null || localizedTerm.Equals(string.Empty)) ? destinationEntry.subtitleText : LocalizationUtils.FormatLocalizedDialogueText(localizedTerm);
                __result = new FinalResponseText(response, responseText);
            }

            return(false);
        }