void CheckStaffOpen() { shopcenter = staffTimer.shopcenter; if (staffTimer == null) { print("NULL TIMER"); } else if (staffTimer.shopcenter == null) { print("NULL SHOPCENTER GỐC"); } else if (shopcenter == null) { print("NULL SHOPCENTER"); } for (int i = 0; i < 4; i++) { if (!shopcenter.isOpenStaffs[i]) { disableItemInList(i); } else if (index == 0) { staff_Click(null, i + 1); } } }
// Use this for initialization void Start() { shopcenter = GameObject.Find("ShopCenter").GetComponent <ShopCenterScript>(); for (int i = 0; i < 16; i++) { couters[i] = cakes[i].GetComponentInChildren <UILabel>(); imgs[i] = cakes[i].GetComponentInChildren <SpriteRenderer>(); } }
// Use this for initialization void Start() { GoogleAnalytics.instance.LogScreen("Shop Screen"); shopcenter = GameObject.FindGameObjectWithTag("ShopObject").GetComponent <ShopCenterScript>(); shopcenter.common.WarningInvisible(CommonObjectScript.Button.Shop); HarvestPlantPrefabs = (GameObject)Resources.Load("Farm/HarvestPlant"); sprites0 = popupServices[0].GetComponentsInChildren <SpriteRenderer>(); sprites1 = popupServices[1].GetComponentsInChildren <SpriteRenderer>(); sprites2 = popupServices[2].GetComponentsInChildren <SpriteRenderer>(); OnNavigatedTo(); }
int Result() { int temp = Random.Range(0, 1000) % 99; if (temp <= 30) { result = maxRation; } else { result = Random.Range(minRation * 1000, (maxRation - 1) * 1000) / 1000; } ShopCenterScript.getBonueResearch(result); return(result); }
// Use this for initialization void Start() { shopcenter = GameObject.Find("ShopCenter").GetComponent <ShopCenterScript>(); if (!shopcenter.isUsingItemWeather) { giftBox.SetActive(false); } else { giftBox.GetComponent <UITexture>().mainTexture = Resources.Load("Shop/ItemWeather/Hop_" + shopcenter.common.itemSelected) as Texture; } for (i = 0; i < 3; i++) { khungItemAnimator[i] = staffObjects[i].transform.FindChild("KhungItem").GetComponent <Animator>(); itemStaff[i] = staffObjects[i].transform.FindChild("ItemStaff").gameObject; } khungItemAnimator[3] = giftBox.GetComponent <Animator>(); indexPopupOpen = -1; indexPopupConfirm = -1; txtWarning = transform.FindChild("TxtNotify").gameObject; if (VariableSystem.language.Equals("Vietnamese")) { txtWarning.GetComponentInChildren <UILabel>().text = "Vào thành phố để thuê nhân viên"; txtPopupConfirm[0].text = "SA THẢI"; txtPopupConfirm[1].text = "Bạn muốn sa thải nhân viên này"; txtPopupConfirm[2].text = "Đồng ý"; txtPopupConfirm[3].text = "Hủy bỏ"; } if (shopcenter.staffDatas[0].typeStaff != 0) { txtWarning.SetActive(false); } if (shopcenter.staffDatas[1].typeStaff != 0) { txtWarning.SetActive(false); } if (shopcenter.staffDatas[2].typeStaff != 0) { txtWarning.SetActive(false); } OnNavigatedTo(); }
public Customer(int typecus = -1) { star = 5; if (typecus == -1) { typeCustomer = UnityEngine.Random.Range(0, 1250) % ShopCenterScript.getNumberCustomer(); } else { typeCustomer = typecus; } indexProduct = -1; timeWait = 24; if (DialogShop.BoughtItem[4]) { timeWait *= 1.2f; //Increase 20% of the customer's time for waiting in shop } isWaiting = false; }
// Use this for initialization void Start() { GoogleAnalytics.instance.LogScreen("Town Screen"); shopcenter = GameObject.FindGameObjectWithTag("ShopObject").GetComponent <ShopCenterScript>(); if (shopcenter.indexTraining != -1) { frameTimer.SetActive(true); showTimer = true; } else { frameTimer.SetActive(false); showTimer = false; } if (shopcenter == null) { print("NULL SHOPCENTER222"); } }