123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166 |
- using System;
- using System.Collections;
- using System.Collections.Generic;
- using I2.Loc;
- using Schedule;
- using UnityEngine;
- using wf;
- public class DescScheduleYotogi : DescScheduleBase
- {
- public override void Init(ScheduleTaskCtrl taskCtrl)
- {
- base.Init(taskCtrl);
- this.m_lReception = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Reception", true);
- this.m_lCare = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Care", true);
- this.m_lTeachRate = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "TeachRate", true);
- this.m_lInyoku = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Inyoku", true);
- this.m_lMvalue = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Mvalue", true);
- this.m_lHentai = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Hentai", true);
- this.m_lHousi = new DescScheduleBase.ParamSet(this.m_goMaidParameterParent, "Housi", true);
- this.m_listMaidItem.Add(this.m_lReception.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lCare.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lTeachRate.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lInyoku.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lMvalue.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lHentai.GetVariableItem());
- this.m_listMaidItem.Add(this.m_lHousi.GetVariableItem());
- this.explanation_label_ = UTY.GetChildObject(base.gameObject, "Description/Message", false).GetComponent<UILabel>();
- this.condition_parent = UTY.GetChildObject(base.gameObject, "Condition/ConditionParent", false);
- for (int i = 0; i < 9; i++)
- {
- GameObject gameObject = Utility.CreatePrefab(this.condition_parent, "SceneDaily/Schedule/Prefab/ConditionUnit", true);
- gameObject.transform.localPosition = new Vector3(0f, (float)(i * 10), 0f);
- UTY.GetChildObject(gameObject, "No", false).GetComponent<UILabel>().text = (i + 1).ToString();
- KeyValuePair<GameObject, UILabel> item = new KeyValuePair<GameObject, UILabel>(gameObject, UTY.GetChildObject(gameObject, "Message", false).GetComponent<UILabel>());
- this.condition_unit_label_.Add(item);
- }
- DescScheduleBase.Reposition(this.condition_parent);
- }
- protected override void UpdateCurentValue()
- {
- Slot slot = this.taskCtrl.ScheduleMgr.GetScheduleApi().slot[this.taskCtrl.CurrentActiveSlotNo];
- Maid maid = slot.maid;
- if (maid == null)
- {
- return;
- }
- this.m_lReception.CurrentValueText = maid.status.reception.ToString();
- this.m_lCare.CurrentValueText = maid.status.care.ToString();
- this.m_lTeachRate.CurrentValueText = (maid.status.teachRate / 10).ToString();
- this.m_lInyoku.CurrentValueText = maid.status.inyoku.ToString();
- this.m_lMvalue.CurrentValueText = maid.status.mvalue.ToString();
- this.m_lHentai.CurrentValueText = maid.status.hentai.ToString();
- this.m_lHousi.CurrentValueText = maid.status.housi.ToString();
- }
- private void UpdateAddValue(ScheduleCSVData.Yotogi data)
- {
- this.m_lReception.AddValueText = base.Sign(data.easyYotogi.reception, null);
- this.m_lCare.AddValueText = base.Sign(data.easyYotogi.care, null);
- this.m_lTeachRate.AddValueText = base.Sign(data.easyYotogi.teach_rate, null);
- this.m_lInyoku.AddValueText = base.Sign(data.easyYotogi.inyoku, null);
- this.m_lMvalue.AddValueText = base.Sign(data.easyYotogi.msei, null);
- this.m_lHentai.AddValueText = base.Sign(data.easyYotogi.hentai, null);
- this.m_lHousi.AddValueText = base.Sign(data.easyYotogi.housi, null);
- }
- protected override void UpdateView(ScheduleCSVData.ScheduleBase work_data)
- {
- ScheduleCSVData.Yotogi yotogi = (ScheduleCSVData.Yotogi)work_data;
- base.Active(true);
- this.explanation_label_.text = yotogi.information;
- this.explanation_label_.GetComponent<Localize>().SetTerm("SceneDaily/スケジュール/説明/" + yotogi.name);
- int num = 0;
- for (int i = 0; i < this.condition_unit_label_.Count; i++)
- {
- if (i < yotogi.condInfo.Count)
- {
- this.condition_unit_label_[i].Key.SetActive(true);
- this.condition_unit_label_[i].Value.text = yotogi.condInfo[i];
- this.condition_unit_label_[i].Value.GetComponent<Localize>().SetTerm("SceneDaily/スケジュール/条件文/" + yotogi.condInfo[i]);
- num++;
- }
- else
- {
- this.condition_unit_label_[i].Key.SetActive(false);
- }
- }
- float num2 = 260f;
- float num3 = 10f;
- float num4 = 25f;
- float num5 = 4f;
- float num6 = 0f;
- GameObject childObject = UTY.GetChildObject(base.gameObject, "Condition/Title", false);
- if (0 < num)
- {
- childObject.SetActive(true);
- num6 += (float)(childObject.GetComponent<UISprite>().height / 2) + num3;
- float y = UTY.GetChildObject(base.gameObject, "Condition/ConditionParent", false).GetComponent<UITable>().padding.y;
- Transform parent = this.condition_unit_label_[0].Key.transform.parent;
- IEnumerator enumerator = parent.transform.GetEnumerator();
- try
- {
- while (enumerator.MoveNext())
- {
- object obj = enumerator.Current;
- Transform transform = (Transform)obj;
- if (transform.gameObject.activeSelf)
- {
- UILabel component = transform.Find("Message").GetComponent<UILabel>();
- num6 += (float)component.height + y * 2f + num5;
- }
- }
- }
- finally
- {
- IDisposable disposable;
- if ((disposable = (enumerator as IDisposable)) != null)
- {
- disposable.Dispose();
- }
- }
- num6 += num4;
- }
- else
- {
- childObject.SetActive(false);
- }
- DescScheduleBase.Reposition(this.condition_parent);
- UTY.GetChildObject(base.gameObject, "BG", false).GetComponent<UISprite>().height = (int)(num2 + num6);
- if (yotogi.easyYotogi != null)
- {
- this.m_goMaidParameter.SetActive(true);
- this.UpdateCurentValue();
- this.UpdateAddValue(yotogi);
- base.ExamineDisplayItem();
- }
- else
- {
- this.m_goMaidParameter.SetActive(false);
- }
- }
- private UILabel explanation_label_;
- private List<KeyValuePair<GameObject, UILabel>> condition_unit_label_ = new List<KeyValuePair<GameObject, UILabel>>();
- private GameObject condition_parent;
- protected DescScheduleBase.ParamSet m_lCare;
- protected DescScheduleBase.ParamSet m_lReception;
- protected DescScheduleBase.ParamSet m_lTeachRate;
- protected DescScheduleBase.ParamSet m_lInyoku;
- protected DescScheduleBase.ParamSet m_lMvalue;
- protected DescScheduleBase.ParamSet m_lHentai;
- protected DescScheduleBase.ParamSet m_lHousi;
- protected DescScheduleBase.ParamSet m_lYotogiCnt;
- }
|