Пример #1
0
    public void SetNodePanel(NodeMain node)
    {
        _node = node;
        if (node == null)
        {
            node_panel.gameObject.SetActive(false);
            colony_actions.gameObject.SetActive(false);
            ship_panel.gameObject.SetActive(false);
        }
        else
        {
            node_panel.gameObject.SetActive(true);
            node_panel.SetNode(node);

            if (node.Data.hasShips())
            {
                ship_panel.gameObject.SetActive(true);
                ship_panel.setNode(node.Data);
            }
            else
            {
                ship_panel.gameObject.SetActive(false);
            }

            if (node.Data.HasColony() && !node.Data.Colony.Faction.AI)
            {
                colony_actions.gameObject.SetActive(true);
                colony_actions.setColony(node.Data.Colony);
            }
            else
            {
                colony_actions.gameObject.SetActive(false);
            }
        }
    }
Пример #2
0
 public void Link(NodeMain node)
 {
     if (links.Contains(node))
     {
         links.Remove(node);
         return;
     }
     links.Add(node);
 }
Пример #3
0
 void DeselectNode()
 {
     if (selected_node == null)
     {
         return;
     }
     selected_node = null;
     node_selection_circle.SetActive(false);
     Menu.SetNodePanel(null);
     ClearSelectedShips();
 }
Пример #4
0
    void SelectNode(NodeMain node)
    {
        if (selected_node == node)
        {
            return;
        }
        //DeselectNode();
        selected_node = node;
        //set hud
        Menu.SetNodePanel(node);
        node_selection_circle.SetActive(true);
        node_selection_circle.transform.position = node.transform.position;

        ClearSelectedShips();
    }
Пример #5
0
        protected virtual void StartNode(byte[] secretKey)
        {
            if (secretKey == null)
            {
                throw new System.ArgumentNullException(nameof(secretKey));
            }

            _log.Info("Starting Node");
            try
            {
                NodeMain nodeMain = ServiceLocator.Current.GetInstance <NodeMain>();

                nodeMain.Initialize(secretKey, _cancellationToken);

                nodeMain.Start();
            }
            finally
            {
                _log.Info("Starting Node completed");
            }
        }
Пример #6
0
 void setCameraTarget(NodeMain node)
 {
     cam.SetTarget(node.transform);
     camera_selection_circle.SetActive(true);
     camera_selection_circle.transform.position = node.transform.position;
 }
Пример #7
0
 public void SetNode(NodeMain node)
 {
     _node = node;
     UpdateHud();
 }
Пример #8
0
 public void setNode(NodeMain node)
 {
     Node = node;
 }