}                                                                                 //do we have enough money

    /// <summary>
    /// func to setting turret to build
    /// </summary>
    /// <param name="turret"></param>
    public void SetTurretToBuild(TurretBluePrint turret)
    {
        turretToBuild = turret; //select turret
        selectedNode  = null;   //deselect node

        nodeUI.Hide();          //hide node ui
    }
    public void SelectTurretToBuild(TurretBlueprint turret)
    {
        turretToBuild = turret;
        selectedNode  = null;

        nodeUI.Hide();
    }
示例#3
0
 private void Update()
 {
     if (!mouseOverNode && Input.GetMouseButtonDown(0) && !EventSystem.current.IsPointerOverGameObject())
     {
         print("close");
         nodeUI.Hide();
     }
 }
示例#4
0
 //İnşa edilecek turret bunu yapmak için shop'a reference oluşturmamız
 public void SelectTurretToBuild(TurretBluePrint turret)
 {
     //biri seçiliyken diğeri kullanılmayacak
     turretToBuild = turret;
     selectedNode  = null;
     //Turret inşa etmek istediğimizde UI kapalı olacak
     nodeUI.Hide();
 }
示例#5
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         descriptionUI.Hide();
         UpgradeUI.Hide();
         turretToBuild = null;
     }
 }
    // Find the selected node
    public void SelectNode(NodeBehaviour node)
    {
        if (selectedNode == node)
        {
            DeselectNode();
            return;
        }
        nodeUI.Hide();
        print("deselect the node");
        selectedNode = node;
        itemToBuild  = null;

        nodeUI.SetTarget(node);
    }
示例#7
0
    }                                                                               //



    public void SelectNode(node node)
    {
        if (selectedNode == node)
        {
            selectedNode = node;
            nodeUI.Hide();
            return;
        }

        selectedNode  = node;
        turretToBuild = null;

        nodeUI.SetTarget(node);
    }
 public void DeselectNode()
 {
     //selectedNode = null;
     if (nodeUI != null)
     {
         nodeUI.Hide();
     }
 }
示例#9
0
 public void DeselectNode()
 {
     somethingSelected = false;
     selectedNode      = null;
     nodeUI.Hide();
     nodeDeselected        = true;
     whichTurretON         = false;
     PathNodes.deselectNow = false;
 }
示例#10
0
 public void DeselectNode()
 {
     if (selectedNode)
     {
         selectedNode.range.SetActive(false);
     }
     selectedNode = null;
     nodeUI.Hide();
 }
示例#11
0
        /// <summary>
        /// Deselects the node the player currently has selected
        /// </summary>
        public void DeselectNode()
        {
            if (_selectedNode != null && _selectedNode.turret != null)
            {
                _selectedNode.turret.GetComponent <Turret>().Deselected();
            }

            _selectedNode = null;
            nodeUI.Hide();
        }
示例#12
0
    public void ResetGame()
    {
        GameState = LevelState.NotStarted;

        nodeUI.Hide();
        endGameUI.SetActive(false);
        waveSpawner.Reset();
        levelMgr.Reset();
        playerStats.Reset();
        shop.Reset();
        BuildManager.instance.DeselectTurret();
    }
示例#13
0
 public void DeselectNode()
 {
     if (selectedNode)
     {
         if (selectedNode.GetComponent <LineRenderer>())
         {
             Destroy(selectedNode.GetComponent <LineRenderer>());
         }
         selectedNode = null;
         nodeUI.Hide();
         natureUI.Hide();
     }
 }
示例#14
0
    public void AddAIDefenders()
    {
        GameObject nodes = GameObject.Find("Nodes");

        Node[] nl = nodes.GetComponentsInChildren <Node>();
        foreach (Node n in nl)
        {
            //if (!n.gameObject.activeSelf)
            //{
            //	Debug.Log("!n.gameObject.activeSelf");
            //}
            BGBuildManager.instance.SelectNodeToBuild(n);
            n.BuildTurret(blueprints[0]);
        }
        NodeUI ui = FindObjectOfType <NodeUI>();

        ui.Hide();
    }
示例#15
0
    public void SelectNode(Node n)
    {
        if (node == n)
        {
            nodeUI.Hide();
            node.rend.material.color = node.startcolor;
            node = null;
            return;
        }

        if (node != null && node != n)
        {
            node.rend.material.color = node.startcolor;
        }

        node = n;
        node.rend.material.color = node.color;
        turretToBuild            = null;

        nodeUI.SetNode(n);
    }
示例#16
0
 public void DisableCanvas()
 {
     selectednode = null;
     nodeui.Hide();
 }
示例#17
0
 private void DeselectNode()
 {
     _selectedNode = null;
     _nodeUI.Hide();
 }
 public void DeselectNode()
 {
     m_SelectedNode = null;
     m_NodeUI.Hide();
 }
示例#19
0
 public void DeselectNode()
 {
     selectedNode = null;
     nodeUI.Hide();
     TowerSelected.ResetImage();
 }
示例#20
0
 public void DeselectNode()
 {
     selectednode = null;
     nodeui.Hide();
 }
示例#21
0
 public void DeselectNode()
 {
     selectedNode.ResetMaterial();
     selectedNode = null;
     nodeUI.Hide();
 }
示例#22
0
 public void DeselectedCube()
 {
     selectedCube = null;
     nodeUI.Hide();
 }
示例#23
0
 public void DeselectNode()
 {
     HideRadiusVisualizer();
     selectedNode = null;
     nodeUI.Hide();
 }
示例#24
0
 public void SetTurretToBuild(TurretPriceList turret)
 {
     turretToBuild = turret;
     nodeUI.Hide();
 }
示例#25
0
 public void NodeThatDeselected()
 {
     NodeThatSelected = null;
     nodeUI.Hide();
 }
示例#26
0
 public void DeselectCell()
 {
     selectedCell = null;
     nodeUI.Hide();
 }
示例#27
0
 public void DeselectNode()
 {
     _selectedTowerFrame = null;
     SelectedNodeUi.Hide();
 }
示例#28
0
 public void DeselectTile()
 {
     _selectedTile = null;
     nodeUI.Hide();
 }
 /// <summary>
 /// The currently selected node is deselected, and the NodeUI menu is hidden.
 /// </summary>
 public void DeselectNode()
 {
     selectedNode = null;
     nodeUI.Hide();
 }
示例#30
0
 public void DeselectNode() // deslects the current node and hides
 {
     selectedNode = null;   // deselects the current node
     nodeUI.Hide();         // hides it
 }