Пример #1
0
    // -----------------------------------------------------------------------------------------

    /// <summary>
    /// Generates a new Tranzmit Node
    /// </summary>
    /// <param name="nodeName">The displayed name of the node.</param>
    /// <returns>The generated Node</returns>
    private Tranzmit_Node GenerateTranzmitNode(string nodeName)
    {
        var node = new Tranzmit_Node
        {
            title    = nodeName,
            Dialogue = nodeName,
            GUID     = Guid.NewGuid().ToString()
        };

        var button = new Button(clickEvent: () => { SelectObject(Tranzmit); });

        button.text = "Find Tranzmit";
        node.mainContainer.Add(button);

        var button2 = new Button(clickEvent: () => { SelectObject(TranzmitDebug); });

        button2.text = "Find Tranzmit Debug";
        node.mainContainer.Add(button2);

        node.SetPosition(TranzmitCorePosition);

        AddElement(node);

        return(node);
    }
Пример #2
0
    // -----------------------------------------------------------------------------------------

    /// <summary>
    /// Generates a new Broadcaster Node
    /// </summary>
    /// <param name="nodeName">The displayed name of the node.</param>
    /// <returns>The generated Node</returns>
    private Tranzmit_Node GenerateTranzmitBoroadcasterNode(string nodeName)
    {
        var node = new Tranzmit_Node
        {
            title    = nodeName,
            Dialogue = nodeName,
            GUID     = Guid.NewGuid().ToString()
        };

        node.SetPosition(TranzmitBroadcastBasePosition);

        AddElement(node);

        return(node);
    }