using FairyGUI;
using UnityEngine;

namespace BingoBrain.Core
{

    public static class NNfds
    {


        public static Vector2 WorldToUIPos(GameObject gameObject)
        {
            var screenPos = Camera.main.WorldToScreenPoint(gameObject.transform.position);

            screenPos.y = Screen.height - screenPos.y;
            var fguiPosition = GRoot.inst.GlobalToLocal(screenPos);
            return fguiPosition;
        }

        public static bool IsPointerOnUI()
        {
            return Stage.isTouchOnUI;
        }
    }
}