コード例 #1
0
        //test search
//		IEnumerator LoadSearchLayer


//		//test->3 layers
//		IEnumerator LoadCategoryFor3layers(Category c)
//		{
//			loadingUI.Show();
//			if (!c.IsLoaded) {
////				c.LoadSubCatagory ();
//				c.LoadSubCatagoryAndProducts ();
//			}
//			yield return new WaitUntil(()=>c.IsLoaded);
//
////			//test
////			loadingSubCatagoryCount = c.SubCategory.Count;
////			loadedSubCatagoryCount = 0;
//			Debug.Log ("How many subcat in this catalogue? " + c.SubCategory.Count);
//			foreach (Category subObj in c.SubCategory)
//			{
//				Debug.Log ("subcatName " + subObj.name);
//				AddCategoryItem (subObj);
//			}
//
//			loadingProductCount = c.Products.Count;
//			loadedProductCount = 0;
//			Debug.Log ("How many proudcts in this catalogue? " + c.Products.Count);
//			foreach (CategoryProduct obj in c.Products)
//			{
//				Debug.Log ("CategoryProduct " + obj.sku);
//				AddResObj(obj);
//			}
//
//			titleText.text = c.name;
//		}

        public void GotoCatalogue(SceneUIController ctl)
        {
            //test
            Debug.Log("GotoCatalogue currentLayer " + currentLayer);
            if (currentLayer == 2)
            {
                titleText.text = parentCategoryName;
                backButton.setTrigger(false);
                LeanTween.moveY(contentRect, subCatRecPos, moveTime);
            }
            else if (currentLayer == 1)
            {
                titleText.text = "Catalogue";
                backButton.setTrigger(true);
                LeanTween.moveY(contentRect, originPosY, moveTime);
            }
            else if (currentLayer == 0)
            {
                ctl.CloseUI(false);
            }
            currentLayer--;
//			titleText.text = parentCategoryName;
        }
コード例 #2
0
 void Start()
 {
     UIController = GameObject.FindObjectOfType<SceneUIController>();
 }