示例#1
0
    void OnMouseDown()
    {
        if (EventSystem.current.IsPointerOverGameObject())
        {
            return;
        }


        if (turret != null)
        {
            BM.SelectNode(this);
            return;
        }

        if (!BM.CanBuild)
        {
            return;
        }

        BuildTurret(BM.GetTurretToBuild());
    }
示例#2
0
    void OnMouseDown()
    {
        if (EventSystem.current.IsPointerOverGameObject())
        {
            return;
        }


        if (turret != null)
        {
            BuildManager.SelectNode(this);
            return;
        }

        if (!BuildManager.CanBuild)
        {
            return;
        }

        //build a tower
        BuildTurret(BuildManager.GetTurretToBuild());
    }