Example #1
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;
	}
Example #2
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;
	}
Example #3
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;
	}
Example #4
0
	public CashStoreMenu OnMenu(eCashStoreMenuMode _mode)
	{
		//if (nowMenu != null)
		//{
		//    if (nowMenu.mainScrollList != null)
		//        nowMenu.mainScrollList.ClearListSync(true);
		//}
		nowCashStoreMenu = menuMain;

		nowMenuMode = _mode;

		HideMiracleInfo();

		List<CashStoreMenu> listNowCashStoreMenu = dicMenuList[nowMenuMode];

		// clear menu
		foreach (CashStoreMenu cashStoreMenu in listNowCashStoreMenu)
			cashStoreMenu.Reset();

		if (nowMenuMode != eCashStoreMenuMode.COSTUME && AsHudDlgMgr.Instance != null)
		{
			if (null != AsHudDlgMgr.Instance.cashShopEntity)
			{
				AsEntityManager.Instance.RemoveEntity(AsHudDlgMgr.Instance.cashShopEntity);
				AsHudDlgMgr.Instance.cashShopEntity = null;
			}
		}

		//if (nowMenuMode != eCashStoreMenuMode.PET && AsHudDlgMgr.Instance != null)
		//{
		//    if (null != AsHudDlgMgr.Instance.cashShopPetEntity)
		//    {
		//        AsEntityManager.Instance.RemoveEntity(AsHudDlgMgr.Instance.cashShopPetEntity);
		//        AsHudDlgMgr.Instance.cashShopPetEntity = null;
		//    }
		//}

		if (nowMenuMode == eCashStoreMenuMode.MAIN)
		{
			menuMain.gameObject.SetActive(true);
			nowCashStoreMenu = menuMain;
		}
		else if (nowMenuMode == eCashStoreMenuMode.CHARGE_MIRACLE)
		{
			menuMain.gameObject.SetActive(false);

			foreach (GameObject menuObject in menuObjects)
				menuObject.SetActive(false);

			txtTitle.Text = AsTableManager.Instance.GetTbl_String(818);

			menuMiracle.gameObject.SetActive(true);
			nowCashStoreMenu = menuMiracle;
		}
		else
		{
			foreach (GameObject menuObject in menuObjects)
				menuObject.SetActive(false);

			nowCashStoreMenu = dicMainMenuItem[nowMenuMode];

			nowCashStoreMenu.gameObject.SetActive(true);

			txtTitle.Text = dicMenuBtn[_mode].Text;

			menuMain.gameObject.SetActive(false);
			menuMiracle.gameObject.SetActive(false);
		}

		scrollList = nowCashStoreMenu.mainScrollList;
		scrollCategory = nowCashStoreMenu.listCategory;

		if (nowCashStoreMenu.mainScrollList != null)
		{
			if (nowCashStoreMenu.mainListItem != null)
				listItemPrefab = nowCashStoreMenu.mainListItem.gameObject;
		}

		// initilize menu
		foreach (CashStoreMenu cashStoreMenu in listNowCashStoreMenu)
			cashStoreMenu.InitMenu(nowUserClass);

		return nowCashStoreMenu;
	}
Example #5
0
	void PlayMenuSound( eCashStoreMenuMode _mode)
	{
		string soundPath = string.Empty;

		switch ( _mode)
		{
			case eCashStoreMenuMode.MAIN:
			case eCashStoreMenuMode.PET:
			case eCashStoreMenuMode.CONVENIENCE:
			case eCashStoreMenuMode.EVENT:
				soundPath = AsSoundPath.CashshopMenu_Package;
				break;

			//case eCashStoreMenuMode.CHARGE_MIRACLE:
			case eCashStoreMenuMode.WEAPON:
			case eCashStoreMenuMode.EQUIPMENT:
			case eCashStoreMenuMode.FREE:
			case eCashStoreMenuMode.COSTUME:
				soundPath = AsSoundPath.CashshopMenu_Miracle;
				break;
			
		}

		if( soundPath != string.Empty)
			AsSoundManager.Instance.PlaySound( soundPath, Vector3.zero, false);
	}
Example #6
0
	public void SetGotoMenuAfterInit(eCashStoreMenuMode _mode, eCashStoreSubCategory _category, int _idx)
	{
		if (afterGotoMenu == eCashStoreMenuMode.NONE)
			return;

		afterGotoMenu = _mode;
		afterSelectCategory = _category;
		afterSelectIdx = _idx;
	}
Example #7
0
	// Use this for initialization
	void Start()
	{
		instance = this;
		
		textTitle.Text = AsTableManager.Instance.GetTbl_String(3);
		
		// < ilmeda, 20120824
//		title.Text = "";
		text.Text = "";
		AsCommonSender.ResetSendCheck();
//		AsLanguageManager.Instance.SetFontFromSystemLanguage( title);
		AsLanguageManager.Instance.SetFontFromSystemLanguage( text);
		AsLanguageManager.Instance.SetFontFromSystemLanguage( btnMiracle_Text_Miracle);//$yde
//		title.Text = AsTableManager.Instance.GetTbl_String(3);
		// ilmeda, 20120824 >
		if( true == TargetDecider.CheckCurrentMapIsIndun())
			btnTown.Text = AsTableManager.Instance.GetTbl_String(1865);
		else
			btnTown.Text = AsTableManager.Instance.GetTbl_String(1368);
		
		btnResurrection.Text = AsTableManager.Instance.GetTbl_String(1367);
		btnShop.spriteText.Text = AsTableManager.Instance.GetTbl_String(1769);

		//$yde
//		btnMiracle_Text_Miracle.Text = AsTableManager.Instance.GetTbl_GlobalWeight_Record( 37).Value.ToString();
		AsUserEntity entity = AsUserInfo.Instance.GetCurrentUserEntity();
		eCLASS __class = entity.GetProperty<eCLASS>( eComponentProperty.CLASS);
		int level = entity.GetProperty<int>( eComponentProperty.LEVEL);
//		btnMiracle_Text_Miracle.Text = AsTableManager.Instance.GetTbl_Level_Record( __class, level).Resurrection_Cost.ToString();
		btnMiracle_Text_Miracle.Text = GetResurrectMiracle().ToString();

		s_MiracleShopOpened = false;
		
		if( true == TargetDecider.CheckCurrentMapIsIndun())
			text.Text = AsTableManager.Instance.GetTbl_String(1864);
		else
			text.Text = AsTableManager.Instance.GetTbl_String(5);
		
//		haveCashTitle.Text = AsTableManager.Instance.GetTbl_String(859);
//		haveCash.Text = AsUserInfo.Instance.nMiracle.ToString();
		remainTimeTitle.Text = AsTableManager.Instance.GetTbl_String(861);

		BoxCollider col = gameObject.collider as BoxCollider;
		col.size = new Vector3( 80.0f, 60.0f, 0.0f);
		
		btnTown.SetInputDelegate( OnTownClicked);
		btnResurrection.SetInputDelegate( OnResurrectionClicked);
		btnShop.SetInputDelegate( OnShopBtnClicked);
		
		int idx = Random.Range( 1, 5);
		switch( idx)
		{

		case 1: m_CashSotreMenu = eCashStoreMenuMode.WEAPON; break;
		case 2: m_CashSotreMenu = eCashStoreMenuMode.PET; break;
		case 3: m_CashSotreMenu = eCashStoreMenuMode.COSTUME; break;
		case 4: m_CashSotreMenu = eCashStoreMenuMode.CONVENIENCE; break;

		}
		string imgStr = "UIPatchResources/DeathDlgImage/DeathDlgImg00" + idx.ToString();
		
		img.renderer.material.mainTexture = ResourceLoad.Loadtexture( imgStr);

		if( true == TargetDecider.CheckCurrentMapIsIndun())
		{
			btnShop.gameObject.SetActive( false);

			if( AsUserInfo.Instance.nMiracle < GetResurrectMiracle())
			{
				btnResurrection.SetControlState( UIButton.CONTROL_STATE.DISABLED);
				btnResurrection.spriteText.SetColor( Color.gray);
			}
		}

//		displayTime = 60;
//		StartCoroutine( TimeProcess());
	}
Example #8
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();
	}