private IEnumerator InitailizeCoroutine(DeckModel deckModel, Action callBack) { float delayStart = Time.deltaTime; ShipModel[] ships = deckModel.GetShips(); for (int i = 0; i < ships.Length; i++) { mUIMissionShipBanners[i].Initialize(i + 1, ships[i]); mUIMissionShipBanners[i].Show(); UIUtil.AnimationOnFocus(mUIMissionShipBanners[i].transform, null); yield return(new WaitForSeconds(0.05f)); } yield return(null); Vector3 localPosition = mLabel_Message.transform.localPosition; float x = localPosition.x - 50f; Vector3 localPosition2 = mLabel_Message.transform.localPosition; float y = localPosition2.y; Vector3 localPosition3 = mLabel_Message.transform.localPosition; Vector3 from = new Vector3(x, y, localPosition3.z); Vector3 to = mLabel_Message.transform.localPosition; mLabel_Message.transform.localPosition = from; mLabel_Message.transform.DOLocalMove(to, 0.3f); DOVirtual.DelayedCall(Time.deltaTime - delayStart, delegate { this.mLabel_Message.transform.DOLocalMove(to, 0.3f); }); mLabel_Message.alpha = 1f; callBack?.Invoke(); }
public void ClickFocusButton() { if (!isSelected) { mFocusButton.SendMessage("OnClick"); UIUtil.AnimationOnFocus(mFocusButton.transform, null); } }
public void ClickFocusButton() { if (!this.isSelected) { this.mFocusButton.SendMessage("OnClick"); UIUtil.AnimationOnFocus(this.mFocusButton.get_transform(), null); } }
private void CountDownTanker() { UIUtil.AnimationOnFocus(mButton_CountDown.transform, null); if (MissionStartTargetModel.TankerMinCount <= SettingTankerCount - 1) { SettingTankerCount--; UpdateSettingTankerCountLabel(SettingTankerCount, isPoor: false); } }
private void CountUpTanker() { UIUtil.AnimationOnFocus(mButton_CountUp.transform, null); if (SettingTankerCount + 1 <= MissionStartTargetModel.TankerMaxCount && SettingTankerCount + 1 <= mHasTankerCount) { SettingTankerCount++; UpdateSettingTankerCountLabel(SettingTankerCount, isPoor: false); } }
private void ChangeFocus(UIButton targetButton, bool needSe) { if (mFocusButton != null && mFocusButton.Equals(mButtonPositive) && targetButton != null && targetButton.Equals(mButtonNegative)) { RemoveFocus(); } if (mFocusButton != null) { mFocusButton.SetState(UIButtonColor.State.Normal, immediate: true); UISelectedObject.SelectedOneButtonZoomUpDown(mFocusButton.gameObject, value: false); } mFocusButton = targetButton; if (mFocusButton != null) { if (needSe) { PlaySE(SEFIleInfos.CommonCursolMove); } mFocusButton.SetState(UIButtonColor.State.Hover, immediate: true); UISelectedObject.SelectedOneButtonZoomUpDown(mFocusButton.gameObject, value: true); UIUtil.AnimationOnFocus(mFocusButton.transform, null); } }
private void ChangeFocus(UIButton targetButton, bool needSe) { if (this.mFocusButton != null && this.mFocusButton.Equals(this.mButtonPositive) && targetButton != null && targetButton.Equals(this.mButtonNegative)) { this.RemoveFocus(); } if (this.mFocusButton != null) { this.mFocusButton.SetState(UIButtonColor.State.Normal, true); UISelectedObject.SelectedOneButtonZoomUpDown(this.mFocusButton.get_gameObject(), false); } this.mFocusButton = targetButton; if (this.mFocusButton != null) { if (needSe) { this.PlaySE(SEFIleInfos.CommonCursolMove); } this.mFocusButton.SetState(UIButtonColor.State.Hover, true); UISelectedObject.SelectedOneButtonZoomUpDown(this.mFocusButton.get_gameObject(), true); UIUtil.AnimationOnFocus(this.mFocusButton.get_transform(), null); } }
private IEnumerator InitailizeCoroutine(DeckModel deckModel, MissionModel missionModel, int hasTankerCount, Action callBack) { float delayStart = Time.deltaTime; mLabel_RequireDay.text = missionModel.Turn.ToString(); mLabel_RequireTanker.text = missionModel.TankerCount.ToString(); mLabel_HasTankerCount.text = hasTankerCount.ToString(); ShipModel[] ships = deckModel.GetShips(); if (missionModel.TankerMinCount <= hasTankerCount) { SettingTankerCount = missionModel.TankerMinCount; UpdateSettingTankerCountLabel(SettingTankerCount, isPoor: false); } else { int num = hasTankerCount - missionModel.TankerMinCount; UpdateSettingTankerCountLabel(SettingTankerCount, isPoor: true); mButton_Positive.isEnabled = false; mButton_CountUp.isEnabled = false; mButton_CountDown.isEnabled = false; } List <IsGoCondition> sortieCondition = new MissionManager(SingletonMonoBehaviour <AppInformation> .Instance.CurrentAreaID).IsValidMissionStart(MissionStartDeckModel.Id, MissionStartTargetModel.Id, SettingTankerCount); bool conditionOk = sortieCondition.Count <= 0; bool otherDeckInMission = missionModel.Deck != null; if (conditionOk && !otherDeckInMission) { mButton_Positive.isEnabled = true; mLabel_Message.text = string.Empty; mLabel_Message.color = Color.black; mLabel_Message.alpha = 1E-09f; mLabel_Message.text = "この艦隊で遠征しますか?"; } else { mButton_Positive.isEnabled = false; mLabel_Message.text = string.Empty; mLabel_Message.color = Color.red; mLabel_Message.alpha = 1E-09f; mLabel_Message.text = GoConditionToString(sortieCondition[sortieCondition.Count - 1]); } isGoCondition = conditionOk; yield return(new WaitForEndOfFrame()); ChangeFocusButton(mButton_Negative); for (int i = 0; i < ships.Length; i++) { mUIMissionShipBanners[i].Initialize(i + 1, ships[i]); mUIMissionShipBanners[i].Show(); UIUtil.AnimationOnFocus(mUIMissionShipBanners[i].transform, null); yield return(new WaitForSeconds(0.05f)); } yield return(new WaitForEndOfFrame()); Vector3 localPosition = mLabel_Message.transform.localPosition; float x = localPosition.x - 50f; Vector3 localPosition2 = mLabel_Message.transform.localPosition; float y = localPosition2.y; Vector3 localPosition3 = mLabel_Message.transform.localPosition; Vector3 from = new Vector3(x, y, localPosition3.z); Vector3 to = mLabel_Message.transform.localPosition; mLabel_Message.transform.localPosition = from; mLabel_Message.transform.DOLocalMove(to, 0.3f); DOVirtual.DelayedCall(Time.deltaTime - delayStart, delegate { this.mLabel_Message.transform.DOLocalMove(to, 0.3f); }); mLabel_Message.alpha = 1f; callBack?.Invoke(); }