Пример #1
0
    private void OnMouseDown()
    {
        if (EventSystem.current.IsPointerOverGameObject())
        {
            return;
        }

        if (!buildManager.canBuild)
        {
            return;
        }

        if (turret != null)
        {
            Debug.Log("Can't build turret there ! TODO : display to the user ");
        }

        buildManager.buildTurretOn(this);
    }