Ejemplo n.º 1
0
    public UINode GenerateEntryPointNode(string name)
    {
        var node = new UINode()
        {
            title = name, IsEntryPoint = true, NodeGUID = Guid.NewGuid().ToString()
        };

        node.SetPosition(new Rect(10, 10, 200, 150));
        node.AddOutputPort("Output");

        node.RefreshExpandedState();
        node.RefreshPorts();

        return(node);
    }
Ejemplo n.º 2
0
    public void AddRPGMenuItemToNode(UINode node, string name, string help, int mp, int atb, string actionString)
    {
        RPGMenuItemData menuItem = new RPGMenuItemData(name, help);

        menuItem.Text            = name;
        menuItem.HelpText        = help;
        menuItem.MPCost          = mp;
        menuItem.ATBCost         = atb;
        menuItem.ActionToPerform = actionString;

        if (actionString.Count() > 0)
        {
            menuItem.ItemType = MenuItemActionType.PerformAction;
        }

        node.MenuData.MenuItems.Add(menuItem);
        node.AddOutputPort(menuItem.Text);
    }