Exemplo n.º 1
0
 protected override void Execute()
 {
     if (gameElements == null)
     {
         return;
     }
     if (bundleInstance == null)
     {
         if (typeof(T) == typeof(GEItem))
         {
             List <GEItem> items = new List <GEItem>(gameElements as IList <GEItem>);
             bundleInstance = MenuItemBundleFactroy.CreateListBundle(menuText, items, parentBundle);
         }
         else if (typeof(T) == typeof(GENeighbour))
         {
             List <GENeighbour> neighbours = new List <GENeighbour>(gameElements as IList <GENeighbour>);
             bundleInstance = MenuItemBundleFactroy.CreateListBundle(menuText, neighbours, parentBundle);
         }
         else if (typeof(T) == typeof(GENpc))
         {
             List <GENpc> npcs = new List <GENpc>(gameElements as IList <GENpc>);
             bundleInstance = MenuItemBundleFactroy.CreateListBundle(menuText, npcs, parentBundle);
         }
     }
     menuController.CurrentBundle = bundleInstance;
 }
Exemplo n.º 2
0
    protected override void Execute()
    {
        string actionResultText = geAnswer.Execute();

        if (actionResultText != null)
        {
            Description.GetInstance().AddDescriptionText(actionResultText);
        }
        if (bundleInstance == null)
        {
            bundleInstance = MenuItemBundleFactroy.CreateConversationLineBundle(LabelUtility.Instance.GetLabel(LabelNames.CONVERSATIONWITH) + geAnswer.ParentLine.ParentConv.ParentNpc.NameText.GetText(), parentBundle, geAnswer.NextLine, answerTo);
        }
        bundleInstance.ExecuteSideEffects();
        menuController.CurrentBundle = bundleInstance;
    }
    protected override void Execute()
    {
        Description descriptionPanel = Description.GetInstance();

        descriptionPanel.ClearDescription();
        if (bundleInstance == null || (actualConv == null || actualConv != npc.ActiveConversation))
        {
            if (actualConv != null)
            {
                actualConv.OnActivationChange -= parentBundle.RefreshOnEvent;
            }
            actualConv     = npc.ActiveConversation;
            bundleInstance = MenuItemBundleFactroy.CreateConversationLineBundle(LabelUtility.Instance.GetLabel(LabelNames.CONVERSATIONWITH) + npc.NameText.GetText(), parentBundle, actualConv.FirstLine, npc.NameText.GetText());

            actualConv.OnActivationChange += parentBundle.RefreshOnEvent;
        }
        bundleInstance.ExecuteSideEffects();
        menuController.CurrentBundle = bundleInstance;
    }
Exemplo n.º 4
0
 protected override void Execute()
 {
     if (bundleInstance == null)
     {
         if (element is GERoom)
         {
             bundleInstance = MenuItemBundleFactroy.CreateBundle(element as GERoom, parentBundle);
         }
         else if (element is GEItem)
         {
             bundleInstance = MenuItemBundleFactroy.CreateBundle(element as GEItem, parentBundle);
         }
         else if (element is GENpc)
         {
             bundleInstance = MenuItemBundleFactroy.CreateBundle(element as GENpc, parentBundle);
         }
         else
         {
             //...
         }
     }
     menuController.CurrentBundle = bundleInstance;
 }