//패키지시 인덱스 등 파라미터 설정
    void Apply_PackageParameter()
    {
        //패키지 타입
        packageType = (Package_Type)(InfosShop.ShopIdx % ((int)STOREMODE_TYPE.Package * 100));


        //활성될 인덱스 설정
        if (packageType == Package_Type.Special)
        {
            activeIDX = 1;
        }
        else
        {
            activeIDX = 0;
        }
    }
Example #2
0
 public Packages(string package_Name = "UNKNOWN", string package_Type = "UNKNOWN", string photographer_1 = " ", string photographer_2 = " ", string photographer_3 = "UNKNOWN", string duration_In_Hour = "UNKNOWN", string duration_In_Day = "UNKNOWN", string printed_Photos = "UNKNOWN", string decoration = "UNKNOWN", string center_Name = "UNKNOWN", string center_Location = "UNKNOWN", string center_Capacity = "UNKNOWN", string regular_Cost = "UNKNOWN", string package_Cost = "UNKNOWN", string money_Save = "UNKNOWN")
 {
     if (Package_Type.Equals("GOLD"))
     {
         string date = Convert.ToString(System.DateTime.Now.Year);
         string s1   = Convert.ToString(date[2]);
         string s2   = Convert.ToString(date[3]);;
         package_Id = s1 + s2 + "G";
     }
     if (Package_Type.Equals("SILVER"))
     {
         string date = Convert.ToString(System.DateTime.Now.Year);
         string s1   = Convert.ToString(date[2]);
         string s2   = Convert.ToString(date[3]);;
         package_Id = s1 + s2 + "S";
     }
     if (Package_Type.Equals("PLATINUM"))
     {
         string date = Convert.ToString(System.DateTime.Now.Year);
         string s1   = Convert.ToString(date[2]);
         string s2   = Convert.ToString(date[3]);;
         package_Id = s1 + s2 + "P";
     }
     if (Package_Type.Equals("REGULAR"))
     {
         string date = Convert.ToString(System.DateTime.Now.Year);
         string s1   = Convert.ToString(date[2]);
         string s2   = Convert.ToString(date[3]);;
         package_Id = s1 + s2 + "R";
     }
     this.package_Name     = package_Name;
     this.package_Type     = package_Type;
     this.photographer_1   = photographer_1;
     this.photographer_2   = photographer_2;
     this.photographer_3   = photographer_3;
     this.duration_In_Hour = duration_In_Hour;
     this.duration_In_Day  = duration_In_Day;
     this.printed_Photos   = printed_Photos;
     this.decoration       = decoration;
     this.center_Name      = center_Name;
     this.center_Location  = center_Location;
     this.center_Capacity  = center_Capacity;
     this.regular_Cost     = regular_Cost;
     this.package_Cost     = package_Cost;
     this.money_Save       = money_Save;
     package_Status        = "Deactivated";
 }
Example #3
0
    //패키지 상품 적용시킬 것들
    void Apply_ShopPackage(Package_Type _packageIdx)
    {
        if (_packageIdx == Package_Type.Month)
        {
            //월정액 남을 일수 있으면 버튼 막고 남은시간 표시
            int RemainMonthCash = UserDataManager.instance.user.Get_user_goods(ITEMTYPE.MONTH_CASH);
            if (RemainMonthCash > 0)
            {
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);

                Lst_Obj[(int)Enum_Object.UnlockTime].SetActive(true);
                UnlockRemainTime.text = string.Format("{0}{1}", RemainMonthCash, TextDataManager.Dic_TranslateText[181]);                 // ~일
            }
            else
            {
                Lst_Obj[(int)Enum_Object.UnlockTime].SetActive(false);
                //버튼 설정
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
                button_buyItem.onClick.AddListener(ResponseButton_Buy_Gem);
            }
        }
        else
        {
            if (UserDataManager.instance.user.chk_PurchaseLimit(infos_shop.PurLimit))
            {
                //패키지 구매했음
                Lst_Obj[(int)Enum_Object.SoldOut].SetActive(true);                 //솔드아웃 활성
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
            }
            else
            {
                //패키지 구매안했음
                Lst_Obj[(int)Enum_Object.SoldOut].SetActive(false);                 //솔드아웃 비활성

                //버튼 설정
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
                button_buyItem.onClick.AddListener(ResponseButton_Buy_Gem);
            }
        }
    }
Example #4
0
    public void ApplyInfo(STOREMODE_TYPE nowStoreMode)
    {
        string bodyText  = string.Empty;
        string bonusText = string.Empty;

        //오픈 여부 체크 !!!
        Chk_openFlag();


        if (nowStoreMode == STOREMODE_TYPE.Gold)
        {
            //버튼 설정
            button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gold);
            button_buyItem.onClick.AddListener(ResponseButton_Buy_Gold);

            image_Icon.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.shopIcon, infos_shop.ShopIdx));

            text_Title.text = string.Format("{0} {1}", infos_shop.SellItNum, TextDataManager.Dic_TranslateText[36]);
        }
        else if (nowStoreMode == STOREMODE_TYPE.Gem)
        {
            //버튼 설정
            button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
            button_buyItem.onClick.AddListener(ResponseButton_Buy_Gem);

            image_Icon.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.shopIcon, infos_shop.ShopIdx));

            text_Title.text = string.Format("{0} {1}", infos_shop.SellItNum, TextDataManager.Dic_TranslateText[37]);
        }
        else if (nowStoreMode == STOREMODE_TYPE.Package)
        {
            Package_Type packageIdx = (Package_Type)(infos_shop.ShopIdx % ((int)STOREMODE_TYPE.Package * 100));



            //이미지
            if (infos_shop.OpenFlg != 0) //오픈아닐때 스프라이트 처리안함 우선 패키지쪽만 예외적으로
            {
                image_Icon.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.shopIcon, infos_shop.ShopIdx));
            }
            //구석탱이보너스 아이콘
            if (packageIdx == Package_Type.Month)
            {
                Lst_Obj[(int)Enum_Object.IconBonus].SetActive(false);
            }
            else
            {
                Lst_Obj[(int)Enum_Object.IconBonus].SetActive(true);
            }

            //패키지 상품 적용시킬 것들
            Apply_ShopPackage(packageIdx);

            ////타이틀 텍스트
            int textIdx = 20000 + (int)packageIdx;
            switch (packageIdx)
            {
            case Package_Type.Month:                                                                               //월정액
                text_Title.text = string.Format(TextDataManager.Dic_TranslateText[textIdx], infos_shop.SellItNum); //25일 패키지
                break;

            case Package_Type.NewUser:                    //신규유저 //신규유저 패키지 단 1회
            case Package_Type.Gold_1:                     //골드패키지1
            case Package_Type.Gold_2:                     //골드패키지2
            case Package_Type.Substance_1:                //실속패키지1
            case Package_Type.Substance_2:                //실속패키지2
            case Package_Type.Substance_3:                //실속패키지3
            case Package_Type.Special:                    //실속패키지3
                text_Title.text = TextDataManager.Dic_TranslateText[textIdx];
                break;
            }
        }
        else if (nowStoreMode == STOREMODE_TYPE.Special)
        {
            //이미지
            image_Icon.sprite = ImageManager.instance.Get_Sprite(string.Format("{0}{1}", DefineKey.shopIcon, infos_shop.ShopIdx));
            //구석탱이보너스 아이콘
            Lst_Obj[(int)Enum_Object.IconBonus].SetActive(true);


            if (UserDataManager.instance.user.chk_PurchaseLimit(infos_shop.PurLimit))
            {
                //스폐셜상품 구매했음
                Lst_Obj[(int)Enum_Object.SoldOut].SetActive(true);                 //솔드아웃 활성
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
            }
            else
            {
                //스폐셜상품 구매안했음
                Lst_Obj[(int)Enum_Object.SoldOut].SetActive(false);                 //솔드아웃 비활성

                //버튼 설정
                button_buyItem.onClick.RemoveListener(ResponseButton_Buy_Gem);
                button_buyItem.onClick.AddListener(ResponseButton_Buy_Gem);
            }

            //타이틀 텍스트
            //text_Title.text = string.Format(TextDataManager.Dic_TranslateText[textIdx], infos_shop.SellItNum);//25일 패키지
        }



        //광고제거상품 체크
        if (infos_shop.AdDelFlg == 1)
        {
            Activate_MaintextOBJ(MainTextType.AdMain);
            //bodyText = "광고제거 추가";
        }

        // 메인텍스트
        List_textMain[(int)MainTextType.normalMain].text = bodyText;        //본내용 텍스트
        //List_textMain[(int)MainTextType.AdMain].text = bodyText;//광고보기제거용 텍스트


        //구매할 아이템이미지 설정
        Apply_ImageUsergoods((ITEMTYPE)infos_shop.BuyItTp);


        image_Icon.SetNativeSize();
        Image_useGoods.SetNativeSize();



        //=============================== 보너스  ==========================
        if (bounusInfo.BonusType != ITEMTYPE.NONE)         // 보너스 아이템 갯수가 있고, 보너스아이템타입이 NONE 아니면 보너스 표시 한다
        {
            if (bounusInfo.BonusType == ITEMTYPE.GOLD)
            {
                Lst_Obj[(int)Enum_Object.Bonus].SetActive(true);
                image_bonusIcon.sprite = ImageManager.instance.Get_Sprite(DefineKey.Gold);
                image_bonusIcon.SetNativeSize();
                text_bonusValue.text = string.Format("{0}", bounusInfo.BonusNum);
            }
            else if (bounusInfo.BonusType == ITEMTYPE.GEM)
            {
                Lst_Obj[(int)Enum_Object.Bonus].SetActive(true);
                image_bonusIcon.sprite = ImageManager.instance.Get_Sprite(DefineKey.Gem);
                image_bonusIcon.SetNativeSize();
                text_bonusValue.text = string.Format("{0}", bounusInfo.BonusNum);
            }
            else
            {
                Lst_Obj[(int)Enum_Object.Bonus].SetActive(false);
            }
        }
        else          // 보너스 아이템 갯수가 없고 보너스아이템타입이 NONE 이면 보너스 표시 안한다
        {
            Lst_Obj[(int)Enum_Object.Bonus].SetActive(false);
        }



        //할인 이전가격
        if (infos_shop != null)
        {
            if (infos_shop.BuyOriItNum != infos_shop.BuyItNum && infos_shop.BuyOriItNum != 0)
            {
                Lst_Obj[(int)Enum_Object.DiscountLine].SetActive(true);
//#if UNITY_IOS
//                text_PriceBefore.text = infos_shop.OriginPrice;
//#else
//                text_PriceBefore.text = infos_shop.BuyOriItNum.ToString();
//#endif

                text_PriceBefore.text = Get_orinPrice();
            }
            else
            {
                Lst_Obj[(int)Enum_Object.DiscountLine].SetActive(false);
            }
        }



//#if UNITY_EDITOR
        text_PriceAfter.text = infos_shop.BuyItNum.ToString();
//#else
        //if (infos_shop.ShopIdx / 100 == 2 || infos_shop.ShopIdx/100 ==3)
        //	text_PriceAfter.text = InAppPurchaseManager.instance.Get_priceForMobile(infos_shop.ShopIdx);
        //else
        //	text_PriceAfter.text = infos_shop.BuyItNum.ToString();
//#endif
    }