示例#1
0
 public static void TakePhoto(Image im, RectTransform rect)
 {
     if (rect != null)
     {
         ImgUtil.ca = rect;
     }
     if (co != null)
     {
         GameKernel.GetInstance().StopCoroutine(co);
     }
     co = GameKernel.GetInstance().StartCoroutine(TakephotoIE(im));
 }
示例#2
0
    protected override void Init()
    {
        kernel = GameKernel.GetInstance();

        m_uistacks   = new Stack <int>();
        m_uicache    = new UIBase[(int)UIPageEnum.Max];
        m_tips_cache = new List <int>();
        sb           = new StringBuilder(256);

        //生成uiroot
        GameObject temp = ResMgr.LoadGameObject(string.Format(m_UIPath, m_root_tag));

        //Debug.Log(string.Format(m_UIPath, m_root_tag));
        m_uiRoot = temp.GetComponentInChildren <UIBase>();
        m_canvas = m_uiRoot.GetComponent <Canvas>();

        //Debug.Log("init the muiRoot");
        GameObject.DontDestroyOnLoad(temp);
        //生成背景遮罩
        temp     = ResMgr.LoadGameObject(string.Format(m_UIPath, m_mask_tag), m_uiRoot.transform);
        m_bgMask = temp.GetComponent <UIMask>();
        m_bgMask.Hide();
    }
示例#3
0
 private void Awake()
 {
     kernel = GameKernel.GetInstance();
     kernel.Init();
 }