Пример #1
0
    /// <summary>
    /// 텍스트 공지사항 출력
    /// </summary>
    void TextBanner()
    {
        string pStamp;

        Ag.LogString(" MenuManager :: joycity TextBanner Count" + Joycity.arrTextNotice.Count);
        for (int i = 0; i < Joycity.arrTextNotice.Count; i++)
        {
            GameObject Gobj;

            JceTextNotice curNoti = Joycity.arrTextNotice [i];
            //curNoti.IsFreqency = true;

            if (curNoti.IsFreqency)
            {
                pStamp = PreviewLabs.PlayerPrefs.GetString("JoyCityTextBannerTextFreq" + curNoti.idx);
                if (string.IsNullOrEmpty(pStamp))
                {
                    curNoti.AlreadySeenNum = 0;
                    Ag.LogDouble(" TextBanner >>>   IsFrequency..  first time  " + curNoti.frequency_time + "   AlreadySeen : " + curNoti.AlreadySeenNum);
                }
                else
                {
                    try {
                        curNoti.AlreadySeenNum = int.Parse(pStamp);
                        Ag.LogDouble(" TextBanner >>>   IsFrequency..  time ?  " + curNoti.AlreadySeenNum);
                    } catch {
                        Ag.LogIntenseWord(" TextBanner >>>   Catch .... >>>>    Error   ");
                        curNoti.AlreadySeenNum = 1;
                    }

                    if (curNoti.AlreadySeenNum >= int.Parse(curNoti.frequency_time))
                    {
                        continue;
                    }
                }
            }

            Gobj = (GameObject)Instantiate(Resources.Load("prefab_General/TextNotice"));
            Gobj.transform.parent = FindGameObject("Ui_camera/Camera", true).transform;
            Gobj.GetComponent <UIAnchor> ().panelContainer = FindGameObject("Ui_camera", true).gameObject.GetComponent <UIPanel> ();
            Gobj.transform.localPosition = new Vector3(0, 0, -1000 - i * 60);
            Gobj.transform.localScale    = new Vector3(1, 1, 1);
            Gobj.GetComponent <CloseThisObject> ().mTimestamp = curNoti.timestamp;

            Gobj.name = "JoyCityTextBanner" + curNoti.idx;
            Gobj.GetComponent <CloseThisObject> ().mUrl = Joycity.arrTextNotice [i].url;
            Ag.LogString("Joycity.arrTextNotice [i].url" + Joycity.arrTextNotice [i].url, false);

            Gobj.GetComponent <CloseThisObject> ().JceNotiObj = curNoti;
            Gobj.transform.FindChild("Label_content").gameObject.GetComponent <UILabel> ().text = curNoti.content;
            Gobj.transform.FindChild("Label_title").gameObject.GetComponent <UILabel> ().text   = curNoti.title;
            mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_close", true), Gobj, "DestoryTextObj");
            mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_detail", true), Gobj, "OpenUrl");
            mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_ok", true), Gobj, "DestoryTextObj");
        }
    }
Пример #2
0
    void GotoAppUrl()
    {
        //Application.OpenURL (mUrl);
        GameObject Gobj;
        Material   ImageBannerPic;

        ImageBannerPic               = Instantiate(Resources.Load("Materials/Imagebanner")) as Material;
        Gobj                         = (GameObject)Instantiate(Resources.Load("prefab_General/Lpanel_Event"));
        Gobj.transform.parent        = mRscrcMan.FindGameObject("Axis/Camera/Match", true).GetComponent <MenuManager> ().dicMenuList ["Ui_lobby"].gameObject.transform;
        Gobj.transform.localPosition = new Vector3(0, 0, -295);
        Gobj.transform.localScale    = new Vector3(1, 1, 1);
        Gobj.name                    = "JoyCityImageBanner";
        //Gobj.GetComponent<CloseThisObject> ().mTimestamp = Joycity.arrImageNoti [i].timestamp;
        Debug.Log(mUrl + "URL");
        Gobj.GetComponent <CloseThisObject> ().mUrl = mUrl;

        Gobj.transform.FindChild("banner").gameObject.GetComponent <UITexture> ().material = ImageBannerPic;
        StartCoroutine(mRscrcMan.FindGameObject("Axis/Camera/Match", true).GetComponent <MenuManager> ().JoycityImageBannerLoad(mImagePath, Gobj.transform.FindChild("banner").gameObject));
        mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_close", true), Gobj, "DestoryObj");
        mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_datail", true), Gobj, "OpenUrl");
    }
Пример #3
0
    // Start is called before the first frame update
    void Start()
    {
        MovNpc        = GetComponent <Npc_movimiento>();
        Puntero_      = new Puntero();
        LectorDetexto = new dialogueclassNPC();

        Canvastext       = GameObject.Find("/Canvas").GetComponent <Canvas>();
        canvasTransicion = GameObject.Find("transiciones").GetComponent <Canvas>();
        CanvasBrawler    = GameObject.Find("baltle interfaceC").GetComponent <Canvas>();

        text = GameObject.Find("Canvas/box Texto/mask/Text").GetComponent <Text>();

        BoxSelecction = GameObject.Find("/Canvas/box Election");

        SpriteRenderer[] ArraySprites = GetComponentsInChildren <SpriteRenderer>();

        foreach (SpriteRenderer Gobj in ArraySprites)
        {
            if (Gobj.name == "impresion")
            {
                ImpresionPanel = Gobj.GetComponent <SpriteRenderer>();
                break;
            }
        }

        itensScrips = new BaulItenScript();

        if (MensajeInicioBatalla == "")
        {
            MensajeInicioBatalla = "Te reto a un duelo(mensaje por defecto)";
        }

        if (PlayerPrefs.HasKey(NombreNpc) == true)
        {
            //Usado = itensScrips.RetornaUso(PlayerPrefs.GetInt(NombreNpc));
            //GetComponent<Npc_movimiento>().validador = false;
        }
    }
Пример #4
0
    /// <summary>
    /// 이미지 공지사항 출력
    /// </summary>
    /// <param name="pCount">P count.</param>
    void ImageBanner(int pCount)
    {
        GameObject Gobj;
        string     StampFreq, StampTime;
        double     PresentStamp, PresentTime;

        Ag.LogIntenseWord("    Image Banner >>>>>>>>>>>>>>>>>   ");
        for (int i = 0; i < pCount; i++)
        {
            JceImgNotice curNoti = Joycity.arrImageNoti [i];
            // Time Stamp Setting ...
            //string timeKey = "JoyCityImageBanner" + curNoti.idx;
            string timeKey = "JoyCityImageBanner" + curNoti.idx;
            StampTime = PreviewLabs.PlayerPrefs.GetString(timeKey);
            if (string.IsNullOrEmpty(StampTime))
            {
                StampTime = "1390441587486";
            }

            PresentStamp = double.Parse(Joycity.arrImageNoti [i].timestamp);
            Material ImageBannerPic;
            ImageBannerPic = Instantiate(Resources.Load("Materials/Imagebanner")) as Material;

            if (curNoti.IsFreqency)
            {
                Ag.LogString("    it's frequency ....    " + ("JoyCityImageBanner1" + curNoti.idx));
                StampFreq = PreviewLabs.PlayerPrefs.GetString("JoyCityImageBannerFreq" + curNoti.idx);
                if (string.IsNullOrEmpty(StampFreq))
                {
                    curNoti.AlreadySeenNum = 0;
                    Ag.LogDouble(" TextBanner >>>   IsFrequency..  first time  " + curNoti.frequency_time + "   AlreadySeen : " + curNoti.AlreadySeenNum);
                }
                else
                {
                    try {
                        curNoti.AlreadySeenNum = int.Parse(StampFreq);
                        Ag.LogDouble(" TextBanner >>>   IsFrequency..  time ?  " + curNoti.AlreadySeenNum);
                    } catch {
                        Ag.LogIntenseWord(" TextBanner >>>   Catch .... >>>>    Error   ");
                        curNoti.AlreadySeenNum = 1;
                    }

                    if (curNoti.AlreadySeenNum >= int.Parse(curNoti.frequency_time))
                    {
                        continue;
                    }
                }
            }

            Gobj = (GameObject)Instantiate(Resources.Load("prefab_General/Lpanel_Event"));
            Gobj.transform.parent        = dicMenuList ["Ui_lobby"].gameObject.transform;
            Gobj.transform.localPosition = new Vector3(0, 0, -295 - i * 60);
            Gobj.transform.localScale    = new Vector3(1, 1, 1);
            Gobj.name = "JoyCityImageBanner" + curNoti.idx;
            Gobj.GetComponent <CloseThisObject> ().mTimestamp = Joycity.arrImageNoti [i].timestamp;
            Gobj.GetComponent <CloseThisObject> ().JceNotiObj = curNoti;
            Ag.LogIntenseWord(Joycity.arrImageNoti [i].platform.ToString() + "PlatformNum");

            Gobj.transform.FindChild("banner").gameObject.GetComponent <UITexture> ().material = ImageBannerPic;

            Gobj.GetComponent <CloseThisObject> ().mUrl = Joycity.arrImageNoti [i].url;

            StartCoroutine(JoycityImageBannerLoad(Joycity.arrImageNoti [i].image_path, Gobj.transform.FindChild("banner").gameObject));
            mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_close", true), Gobj, "DestoryObj");
            mRscrcMan.AddComponentUISendMessage(mRscrcMan.FindChild(Gobj, "btn_datail", true), Gobj, "OpenUrl");

            try {
                if (Ag.UnixTimeStampToDateTimeAddmili(double.Parse(StampTime)).AddDays(1) > Ag.UnixTimeStampToDateTimeAddmili(PresentStamp))
                {
                    Gobj.SetActive(false);
                }
            } catch {
                Ag.LogIntenseWord("ImageBanner Error");
            }
        }
    }