当前位置: 首页>>代码示例>>C#>>正文


C# NPC.UpdateDefaultText方法代码示例

本文整理汇总了C#中NPC.UpdateDefaultText方法的典型用法代码示例。如果您正苦于以下问题:C# NPC.UpdateDefaultText方法的具体用法?C# NPC.UpdateDefaultText怎么用?C# NPC.UpdateDefaultText使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在NPC的用法示例。


在下文中一共展示了NPC.UpdateDefaultText方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: updateDecline

        public void updateDecline(NPC toControl)
        {
            numDeclines++;
            if (numDeclines == 1) {
                _allChoiceReactions.Remove(readyChoice);
                _allChoiceReactions.Remove(NotYetChoice);
                GUIManager.Instance.RefreshInteraction();
                NotYetChoice = new Choice ("Not yet", "Please!! I need practice!");

                _allChoiceReactions.Add(NotYetChoice, new DispositionDependentReaction(declineFortuneState));
                _allChoiceReactions.Add(readyChoice, new DispositionDependentReaction(acceptFortuneState));
            }

            if (numDeclines == 2) {
                _allChoiceReactions.Remove(readyChoice);
                _allChoiceReactions.Remove(NotYetChoice);
                toControl.UpdateDefaultText("You're back! Ready for your fortune?");
                GUIManager.Instance.RefreshInteraction();
                NotYetChoice = new Choice ("Not yet", "Ok, come back soon! Predictions come and go you know!");

                _allChoiceReactions.Add(NotYetChoice, new DispositionDependentReaction(declineFortuneState));
                _allChoiceReactions.Add(readyChoice, new DispositionDependentReaction(acceptFortuneState));
            }

            if (numDeclines == 3) {
                _allChoiceReactions.Remove(readyChoice);
                _allChoiceReactions.Remove(NotYetChoice);
                toControl.UpdateDefaultText("I promise it won't be scary!");
                GUIManager.Instance.RefreshInteraction();
                NotYetChoice = new Choice ("Not yet", "Ok... You win.");

                _allChoiceReactions.Add(NotYetChoice, new DispositionDependentReaction(declineFortuneState));
                _allChoiceReactions.Add(readyChoice, new DispositionDependentReaction(acceptFortuneState));
            }

            if (numDeclines == 4) {
                _allChoiceReactions.Remove(readyChoice);
                _allChoiceReactions.Remove(NotYetChoice);
                toControl.UpdateDefaultText("Please...?");
                GUIManager.Instance.RefreshInteraction();
                readyChoice = new Choice ("I'm ready!", "I'm glad you finally decided to join me.");
                NotYetChoice = new Choice ("Not yet", "Good catch. I thought that trick would work.");

                _allChoiceReactions.Add(readyChoice, new DispositionDependentReaction(acceptFortuneState));
                _allChoiceReactions.Add(NotYetChoice, new DispositionDependentReaction(declineFortuneState));
            }

            if (numDeclines >= 5) {
                //FlagManager.instance.SetFlag(FlagStrings.MeanToFortuneteller);
                _allChoiceReactions.Remove(readyChoice);
                _allChoiceReactions.Remove(NotYetChoice);
                toControl.UpdateDefaultText("Ok... I'll find someone else do their fortune then.");
                GUIManager.Instance.RefreshInteraction();
                SetOnCloseInteractionReaction(new DispositionDependentReaction(changeToGiveUpState));
            }
        }
开发者ID:,项目名称:,代码行数:56,代码来源:

示例2: updateCurrentText

 public void updateCurrentText(NPC toControl)
 {
     toControl.UpdateDefaultText("Do you take the left path or the right path?");
     GUIManager.Instance.RefreshInteraction();
 }
开发者ID:,项目名称:,代码行数:5,代码来源:


注:本文中的NPC.UpdateDefaultText方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。