public void updateUI() { int days = ServerTimeKit.getCurrentMonth(); if (days == 1 || days == 3 || days == 5 || days == 7 || days == 8 || days == 10 || days == 12) { count = 31; } else if (days == 4 || days == 6 || days == 9 || days == 11) { count = 30; } else { if (ServerTimeKit.getYear() % 4 == 0 || (ServerTimeKit.getYear() % 100 == 0 && ServerTimeKit.getYear() % 400 == 0)) { count = 29; } else { count = 28; } } if (monthNum1 != null && monthNum2 != null) { if (ServerTimeKit.getCurrentMonth() < 10) { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SIGNIN_TEXTURE + ("month_0" + ServerTimeKit.getCurrentMonth()), monthNum1); monthNum1.transform.localPosition = new Vector3(-115, 63, 0); monthNum2.gameObject.SetActive(false); } else { ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SIGNIN_TEXTURE + ("month_01"), monthNum1); ResourcesManager.Instance.LoadAssetBundleTexture(ResourcesManager.SIGNIN_TEXTURE + ("month_0" + (ServerTimeKit.getCurrentMonth() - 10)), monthNum2); monthNum1.transform.localPosition = new Vector3(-132, 63, 0); monthNum2.transform.localPosition = new Vector3(-95, 63, 0); } } if (signTotalNum != null) { signTotalNum.text = (SignInManagerment.Instance.stateList.Count > count ? count : SignInManagerment.Instance.stateList.Count) + "/" + count; } if (buttonAllSignAward != null) { buttonAllSignAward.disableButton(true); int data = ServerTimeKit.getDataBySeconds(activeTime.getStartTime()); if (SignInManagerment.Instance.stateList.Count >= (count - data + 1)) { int ssid = StringKit.toInt(notice.sid + "" + ServerTimeKit.getCurrentMonth()); SignInSample sample = SignInSampleManager.Instance.getSignInSampleBySid(ssid); if (sample != null && !SignInManagerment.Instance.stateList.Contains(sample.allSignSid)) { buttonAllSignAward.disableButton(false); } } } }