void SelectFirstCategory()
	{
		nowSubCatogory = eCashStoreSubCategory.HAIR;
		btnRadios[0].Value = true;
		playSelectSound = false;
		listCategory.SetSelectedItem(0);
	}
Esempio n. 2
0
	public CashStoreAdInfoWeb(Texture2D _texture, string _imageName, eCashStoreMenuMode _menuMode, eCashStoreMenuMode _gotoMenu, eCashStoreSubCategory _subCategory, string _linkUrl)
	{
		texture = _texture;
		imageName = _imageName;
		menuMode = _menuMode;
		gotoMenuMode = _gotoMenu;
		subCategory = _subCategory;
		linkUrl = _linkUrl;
	}
Esempio n. 3
0
	public void AddStoreItemInfoKind(eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory,  Store_Item_Info_Table _storeItemElement)
    {
		if (!dicData.ContainsKey(_mainCategory))
			dicData.Add(_mainCategory, new Dictionary<eCashStoreSubCategory, List<Store_Item_Info_Table>>());

		if (!dicData[_mainCategory].ContainsKey(_subCategory))
			dicData[_mainCategory].Add(_subCategory, new List<Store_Item_Info_Table>());

        dicData[_mainCategory][_subCategory].Add(_storeItemElement);
    }
Esempio n. 4
0
	public List<Store_Item_Info_Table> GetStoreItem(eCashStoreMainCategory _main, eCashStoreSubCategory _sub)
    {
		if (dicData.ContainsKey(_main))
		{
			if (dicData[_main].ContainsKey(_sub))
				return dicData[_main][_sub];
			else
				return new List<Store_Item_Info_Table>();
		}
		else
			return new List<Store_Item_Info_Table>();
    }
Esempio n. 5
0
    public Store_Item_Info_Table()
    {
        Key			= -1;
        ID			= -1;
        Count		= 0;
		SetItemID	= 0;
		DescID		= 0;
        ID_String	= "-1";
        Highlight	= eSHOPITEMHIGHLIGHT.eSHOPITEMHIGHLIGHT_NONE;
        Price		= 0;
		MainCategory	= eCashStoreMainCategory.NONE;
		SubCategory		= eCashStoreSubCategory.NONE;
    }
	public void InitComponent()
	{
		dicExplainID.Clear();

		AsLanguageManager.Instance.SetFontFromSystemLanguage(txtAd);
		AsLanguageManager.Instance.SetFontFromSystemLanguage(btnLineup.spriteText);
		AsLanguageManager.Instance.SetFontFromSystemLanguage(btnNote.spriteText);


		txtAd.Text = AsTableManager.Instance.GetTbl_String(2235);
		btnLineup.Text = AsTableManager.Instance.GetTbl_String(2236);
		btnNote.Text = AsTableManager.Instance.GetTbl_String(2237);

		int count = 0;
		foreach (UIRadioBtn radio in btnRadios)
		{
			AsLanguageManager.Instance.SetFontFromSystemLanguage(radio.spriteText);
			radio.Text = AsTableManager.Instance.GetTbl_String(btnRadioNameIDs[count]);
			radio.Data = count;
			count++;

			radio.SetInputDelegate(RadioBtnInput);
		}

		dicRadioBtn.Clear();

		for (int i = 0; i < subCategories.Length; i++)
			dicRadioBtn.Add(subCategories[i], btnRadios[i]);

		if (subCategories != null)
		{
			for (int i = 0; i < subCategories.Length; i++)
				dicExplainID.Add(subCategories[i], explainIDs[i]);
		}

		dicCategoryItem.Clear();
		if (subCategoryItmes != null)
		{
			for (int i = 0; i < subCategoryItmes.Length; i++)
				dicCategoryItem.Add(subCategories[i], subCategoryItmes[i]);
		}

		nowSubCatogory = eCashStoreSubCategory.EQUIPHIGH;
		mainListItem = subCategoryItmes[0].GetComponent<UIListItemContainer>();
		btnRadios[0].Value = true;
		AddListItem(subCategories[0]);

		btnLineup.SetInputDelegate(ProcessLineup);

		btnNote.AddInputDelegate(ShowNoteWebPage);
	}
Esempio n. 7
0
	public Store_Item_Info_Table(Store_Item_Type _storeItemType, int _key, int _itemID, int _count, int _itemDescID, int _setItemID, eSHOPITEMHIGHLIGHT _highlight, int _price, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
	{
        Type			= _storeItemType;
        Key				= _key;
		ID				= _itemID;
		Count			= _count;
		DescID			= _itemDescID;
		SetItemID		= _setItemID;
        ID_String		= _itemID.ToString();
        Highlight		= _highlight;
        Price			= _price;
		MainCategory	= _mainCategory;
		SubCategory		= _subCategory;

	}
	public override void SetCategory(eCashStoreSubCategory _eSubCategory)
	{
		UIRadioBtn btn = dicRadioBtn.ContainsKey(_eSubCategory) ? dicRadioBtn[_eSubCategory] : null;

		if (btn != null)
		{
			nowSubCatogory = _eSubCategory;
			btn.Value = true;
			ForcedSelectCategory(_eSubCategory);
		}
	}
Esempio n. 9
0
	public void GoToMenu( eCashStoreMenuMode _mode, eCashStoreSubCategory _selectCategory, bool _playSound = true, bool _initFirst = false, bool _notCheckMinor = false)
	{
		if (!dicMenuBtn.ContainsKey(_mode))
		{
			if (_mode != eCashStoreMenuMode.MAIN && _mode != eCashStoreMenuMode.CHARGE_MIRACLE) 
			{
				Debug.LogWarning(_mode + "is not contain(GoToMenu)");
				return;
			}
		}

		if (_mode == eCashStoreMenuMode.CHARGE_MIRACLE && _notCheckMinor == false)
		{
			AsMinorCheckInfo checker = new AsMinorCheckInfo();

			bool loadFile = checker.LoadFile();

			bool canOpen = checker.CheckMinorInfo();

			if (loadFile == false || canOpen == false)
			{
				LockInput(true);

				GameObject obj = ResourceLoad.CreateGameObject("UI/AsGUI/GUI_MinorCheck");
				AsMinorCheckerDlg dlg = obj.GetComponent<AsMinorCheckerDlg>();
				dlg.Show(true, nowUserClass, _mode, eCashStoreSubCategory.NONE, 0, false);

				return;
			}
		}


		CashStoreMenu menu = OnMenu( _mode);

		// menu btn on
		if (dicMenuBtn.ContainsKey(_mode))
		{
			dicMenuBtn[_mode].SetState(0);
			dicMenuBtn[_mode].Value = true;
		}

		if( menu != null)
			menu.SetCategory(_selectCategory);

		if( _playSound == true)
			PlayMenuSound( _mode);

		if (_initFirst == false && _mode != eCashStoreMenuMode.COSTUME)
			nowState = StoreState.NOTOUCH;
	}
Esempio n. 10
0
	public void SetGotoMenuAfterInit(eCashStoreMenuMode _mode, eCashStoreSubCategory _category, int _idx)
	{
		if (afterGotoMenu == eCashStoreMenuMode.NONE)
			return;

		afterGotoMenu = _mode;
		afterSelectCategory = _category;
		afterSelectIdx = _idx;
	}
Esempio n. 11
0
	public void RadioBtnInput(ref POINTER_INFO ptr)
	{
		if (ptr.evt == POINTER_INFO.INPUT_EVENT.TAP)
		{
			nowSubCatogory = subCategories[(int)ptr.targetObj.Data];

            AsSoundManager.Instance.PlaySound(AsSoundPath.ButtonClick, Vector3.zero, false);

			CategoryRadioForcedOn(nowSubCatogory);
		}
	}
Esempio n. 12
0
	public List<Store_Item_Info_Table> GetCashStoreItems(eCLASS _eClass, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
	{
		return m_Tbl_CachStore.GetCashStoreItemInfo(_eClass, _mainCategory, _subCategory);
	}
Esempio n. 13
0
	public virtual void SetCategory( eCashStoreSubCategory _eSubCategory)
	{
	}
	public void AddListItem(eCashStoreSubCategory _subCategory)
	{
		mainScrollList.ClearListSync(true);

		nowSubCatogory = _subCategory;

		List<Store_Item_Info_Table> listItem = AsTableManager.Instance.GetCashStoreItems(userClass, eCashStoreMainCategory.CONVENIENCE, nowSubCatogory);

		listFilteredItem = new List<Store_Item_Info_Table>();

		int usrLevel = AsEntityManager.Instance.UserEntity.GetProperty<int>(eComponentProperty.LEVEL);

		//int checkLevel = GetGachaLevel(usrLevel);

		foreach (Store_Item_Info_Table itemInfo in listItem)
		{
			Item item = ItemMgr.ItemManagement.GetItem(itemInfo.ID);

			if (item == null)
				continue;
			
			listFilteredItem.Add(itemInfo);
		}

		addItemToList(listFilteredItem);
	}
	public void ForcedSelectCategory(eCashStoreSubCategory _eSubCategory)
	{
		if (_eSubCategory == eCashStoreSubCategory.HAIR)
		{
			mainScrollList.ClearListSync(true);
			SettingForHair();
			SelectFirstCategory();
		}
		else
		{
			SettingForOther();
			AddListItem(_eSubCategory);
		}
	}
Esempio n. 16
0
	public List<Store_Item_Info_Table> GetCashStoreItem(eCLASS _class, eCashStoreMainCategory _mainCetegory, eCashStoreSubCategory _subCategory)
    {
		if (dicStoreItemByClass.ContainsKey(_class))
			return dicStoreItemByClass[_class].GetStoreItem(_mainCetegory, _subCategory);
		else
			return new List<Store_Item_Info_Table>();
    }
Esempio n. 17
0
	void CategoryRadioForcedOn(eCashStoreSubCategory _subCategory)
	{
		if (_subCategory == eCashStoreSubCategory.PETEGG)
			SettingForEgg(_subCategory);
		else
			Setting(_subCategory);

		// setting for desc
		SettingDescription(_subCategory);
	}
Esempio n. 18
0
	public List<Store_Item_Info_Table> GetCashStoreItemInfo(eCLASS _eClass, eCashStoreMainCategory _mainCategory, eCashStoreSubCategory _subCategory)
    {
        List<Store_Item_Info_Table> returnList = new List<Store_Item_Info_Table>();

		List<Store_Item_Info_Table> listStoreItemInfo = m_ResourceTable.GetCashStoreItem(_eClass, _mainCategory, _subCategory);
        List<Store_Item_Info_Table> listStoreItemInfoAll = new List<Store_Item_Info_Table>();
        
        if (_eClass != eCLASS.All)
			listStoreItemInfoAll = m_ResourceTable.GetCashStoreItem(eCLASS.All, _mainCategory, _subCategory);

        if (listStoreItemInfo != null)
            returnList.AddRange(listStoreItemInfo);

        if (listStoreItemInfoAll != null)
            returnList.AddRange(listStoreItemInfoAll);

        return returnList;
    }
Esempio n. 19
0
	void SettingDescription(eCashStoreSubCategory _subCategory)
	{
		if (_subCategory == eCashStoreSubCategory.PETEGG)
			txtAd.Text = AsTableManager.Instance.GetTbl_String(2735);
		else if (_subCategory == eCashStoreSubCategory.PETACC)
			txtAd.Text = AsTableManager.Instance.GetTbl_String(2736);
		else if (_subCategory == eCashStoreSubCategory.PETFOOD)
			txtAd.Text = AsTableManager.Instance.GetTbl_String(84711);
		else if (_subCategory == eCashStoreSubCategory.PETPOTION)
			txtAd.Text = AsTableManager.Instance.GetTbl_String(84712);
	}
Esempio n. 20
0
	public void Show(bool _normalOpen, eCLASS _class, eCashStoreMenuMode _mode, eCashStoreSubCategory _category, int _idx, bool _toMiralce = false)
	{
		usrClass = _class;
		isNormalOpen = _normalOpen;
		menuMode = _mode;
		category = _category;
		idx = _idx;
		toMiracle = _toMiralce;

		Step1();
	}
Esempio n. 21
0
	public void SettingForEgg(eCashStoreSubCategory _subCategory)
	{
		if (gachaBtn != null) gachaBtn.gameObject.SetActive(true);

		mainScrollList.ClearListSync(true);

		mainScrollList.gameObject.SetActive(false);

		btnNote.gameObject.SetActive(true);

		btnLineup.gameObject.SetActive(true);

		listFilteredItem.Clear();

		nowSubCatogory = _subCategory;

		List<Store_Item_Info_Table> listItem = AsTableManager.Instance.GetCashStoreItems(eCLASS.PET, eCashStoreMainCategory.PET, nowSubCatogory);

		if (listItem.Count >= 1)
		{
			listFilteredItem.Add(listItem[0]);

			gachaBtn.spriteText.Text = listItem[0].Price.ToString();
		}

		UpdateArrowPos();
	}
Esempio n. 22
0
	public void ActivateItem( eCashStoreMenuMode _mode, eCashStoreSubCategory _eSubCategory, int _idx)
	{
		CashStoreMenu menu = OnMenu( _mode);

		if (dicMenuBtn.ContainsKey(_mode) == true)
			dicMenuBtn[_mode].Value = true;

		if( null != menu)
			menu.SetCategory(_eSubCategory);

		menu.ActivateItem( _idx);
	
		if (TooltipMgr.Instance != null)
			TooltipMgr.Instance.Clear();
	
		nowState = StoreState.NOTOUCH;
	}
Esempio n. 23
0
	public void Setting(eCashStoreSubCategory _subCategory)
	{
		if (gachaBtn != null) gachaBtn.gameObject.SetActive(false);

		btnNote.gameObject.SetActive(false);

		btnLineup.gameObject.SetActive(false);

		mainScrollList.gameObject.SetActive(true);

		AddListItem(_subCategory);

		UpdateArrowPos();
	}
	public void AddListItem(eCashStoreSubCategory _subCategory)
	{
		if (dicExplainID.ContainsKey(_subCategory))
			txtAd.Text = AsTableManager.Instance.GetTbl_String(dicExplainID[_subCategory]);

		mainListItem = dicCategoryItem[_subCategory].GetComponent<UIListItemContainer>();

		mainScrollList.ClearListSync(true);

		nowSubCatogory = _subCategory;

		List<Store_Item_Info_Table> listItem = AsTableManager.Instance.GetCashStoreItems(userClass, eCashStoreMainCategory.EQUIPMENT, nowSubCatogory);

		listFilteredItem = new List<Store_Item_Info_Table>();

		int usrLevel = AsEntityManager.Instance.UserEntity.GetProperty<int>(eComponentProperty.LEVEL);

		int checkLevel = GetGachaLevel(usrLevel);

		foreach (Store_Item_Info_Table itemInfo in listItem)
		{
			Item item = ItemMgr.ItemManagement.GetItem(itemInfo.ID);

			if (item == null)
				continue;

			if (item.ItemData.levelLimit == checkLevel)
				listFilteredItem.Add(itemInfo);
		}

		addItemToList(listFilteredItem);
	}
Esempio n. 25
0
	public void AddListItem(eCashStoreSubCategory _subCategory)
	{
		mainScrollList.ClearListSync(true);

		nowSubCatogory = _subCategory;

		List<Store_Item_Info_Table> listItem = AsTableManager.Instance.GetCashStoreItems(eCLASS.PET, eCashStoreMainCategory.PET, nowSubCatogory);

		listFilteredItem = new List<Store_Item_Info_Table>();

		foreach (Store_Item_Info_Table itemInfo in listItem)
		{
			Item item = ItemMgr.ItemManagement.GetItem(itemInfo.ID);

			if (item == null)
				continue;

			listFilteredItem.Add(itemInfo);
		}

		addItemToList(listFilteredItem);
	}
	public override void SetCategory(eCashStoreSubCategory _eSubCategory)
	{
		UIRadioBtn btn = dicRadioBtn.ContainsKey(_eSubCategory) == true ? dicRadioBtn[_eSubCategory] : null;

		if (btn != null)
		{
			btn.Value = true;
			AddListItem(_eSubCategory);
		}
	}
Esempio n. 27
0
	//public override void ClickMainListItemProcess(StoreItemInfoUI _storeItemInfoUI)
	//{
	//    // only process hair item
	//    if (nowSubCatogory == eCashStoreSubCategory.PETACC)
	//    {
	//        if (null != AsHudDlgMgr.Instance.cashStore)
	//        {
	//            AsHudDlgMgr.Instance.cashStore.LockInput(true);
	//            AsHudDlgMgr.Instance.cashStore.ShowLoadingIndigator(string.Empty);
	//        }
	//    }
	//}

	public override void SetCategory(eCashStoreSubCategory _eSubCategory)
	{
		UIRadioBtn btn = dicRadioBtn.ContainsKey(_eSubCategory) ? dicRadioBtn[_eSubCategory] : null;

		if (btn != null)
		{
			btn.Value = true;
			nowSubCatogory = _eSubCategory;
			CategoryRadioForcedOn(_eSubCategory);
			listCategory.SetSelectedItem(0);
		}
	}