Ejemplo n.º 1
0
    public GameObject PopUpMsg(string strTitle, POPUP_TYPE type = POPUP_TYPE.YES_NO)
    {
        GameObject PopUpMsg = Instantiate(_PopupMsg) as GameObject;

        PopUpMsg.transform.Find("Title").GetComponent <UILabel>().text = strTitle;

        if (type.Equals(POPUP_TYPE.YES_NO))
        {
            PopUpMsg.GetComponent <PopupMsg>().m_popUpType = POPUP_TYPE.YES_NO;
        }
        else if (type.Equals(POPUP_TYPE.CONFIRM))
        {
            PopUpMsg.GetComponent <PopupMsg>().m_popUpType = POPUP_TYPE.CONFIRM;
        }

        return(PopUpMsg);
    }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        transform.parent        = GameObject.Find("UI Root").transform;
        transform.localScale    = Vector3.one;
        transform.localPosition = new Vector3(0, 812f);
        iTween.MoveTo(gameObject, iTween.Hash("y", 0, "islocal", true, "time", 0.5f, "easetype", "easeOutBack"));

        if (m_popUpType.Equals(POPUP_TYPE.CONFIRM))
        {
            transform.Find("Button_No").gameObject.SetActive(false);
            transform.Find("Button_Yes").transform.localPosition = new Vector3(0, -59);
        }
    }