using System; using System.Collections.Generic; using UnityEngine; using wf; public class StatusCtrl : MonoBehaviour { public void Init(StatusMgr statusMgr, GameObject goStatusPanel) { this.m_mgr = statusMgr; this.m_goPanel = goStatusPanel; } private void InitViewer() { this.m_txtMaidIcon = UTY.GetChildObject(this.m_goPanel, "MaidIcon/Icon", false).GetComponent(); GameObject childObject = UTY.GetChildObject(this.m_goPanel, "Name", false); this.m_lFirstName = UTY.GetChildObject(childObject, "FirstName", false).GetComponent(); this.m_lLastName = UTY.GetChildObject(childObject, "LastName", false).GetComponent(); this.m_lContractType = UTY.GetChildObject(this.m_goPanel, "Column1/ContractType/Value", false).GetComponent(); this.m_lPersonal = UTY.GetChildObject(this.m_goPanel, "Column1/Character/Value", false).GetComponent(); this.m_lSexualExperience = UTY.GetChildObject(this.m_goPanel, "Column1/SexExperience/Value", false).GetComponent(); GameObject childObject2 = UTY.GetChildObject(this.m_goPanel, "Column1/MaidClass", false); this.m_lMaidClass = UTY.GetChildObject(childObject2, "Value", false).GetComponent(); this.m_lMaidClassLevel = UTY.GetChildObject(childObject2, "Level/Value", false).GetComponent(); this.m_lMaidClassExp = UTY.GetChildObject(childObject2, "Exp/CurrentExp/Value", false).GetComponent(); this.m_lMaidClassRequiredExp = UTY.GetChildObject(childObject2, "Exp/RequiredExp/Value", false).GetComponent(); GameObject childObject3 = UTY.GetChildObject(this.m_goPanel, "Column1/YotogiClass", false); this.m_lYotogiClass = UTY.GetChildObject(childObject3, "Value", false).GetComponent(); this.m_lYotogiClassLevel = UTY.GetChildObject(childObject3, "Level/Value", false).GetComponent(); this.m_lYotogiClassExp = UTY.GetChildObject(childObject3, "Exp/CurrentExp/Value", false).GetComponent(); this.m_lYotogiClassRequiredExp = UTY.GetChildObject(childObject3, "Exp/RequiredExp/Value", false).GetComponent(); GameObject childObject4 = UTY.GetChildObject(this.m_goPanel, "Column1/BodySize/Parent", false); this.m_lHeight = UTY.GetChildObject(childObject4, "Height/Value", false).GetComponent(); this.m_lWeight = UTY.GetChildObject(childObject4, "Weight/Value", false).GetComponent(); this.m_lBust = UTY.GetChildObject(childObject4, "Bust/Value", false).GetComponent(); this.m_lCup = UTY.GetChildObject(childObject4, "Bust/Cup/Value", false).GetComponent(); this.m_lWaist = UTY.GetChildObject(childObject4, "Waist/Value", false).GetComponent(); this.m_lHip = UTY.GetChildObject(childObject4, "Hip/Value", false).GetComponent(); GameObject childObject5 = UTY.GetChildObject(UTY.GetChildObject(this.m_goPanel, "Parameter", false), "Parent", false); this.m_lRelation = UTY.GetChildObject(childObject5, "Block1/Relation/Value", false).GetComponent(); this.m_lConditionText = UTY.GetChildObject(childObject5, "Block1/ConditionText/Value", false).GetComponent(); this.m_lLikability = UTY.GetChildObject(childObject5, "Block1/Likability/Value", false).GetComponent(); this.m_lLovely = UTY.GetChildObject(childObject5, "Block2/Lovely/Value", false).GetComponent(); this.m_lElegance = UTY.GetChildObject(childObject5, "Block2/Elegance/Value", false).GetComponent(); this.m_lCharm = UTY.GetChildObject(childObject5, "Block2/Charm/Value", false).GetComponent(); this.m_lCare = UTY.GetChildObject(childObject5, "Block2/Care/Value", false).GetComponent(); this.m_lReception = UTY.GetChildObject(childObject5, "Block2/Reception/Value", false).GetComponent(); this.m_lCooking = UTY.GetChildObject(childObject5, "Block2/Cooking/Value", false).GetComponent(); this.m_lDance = UTY.GetChildObject(childObject5, "Block2/Dance/Value", false).GetComponent(); this.m_lVocal = UTY.GetChildObject(childObject5, "Block2/Vocal/Value", false).GetComponent(); this.m_lOthersPlayCount = UTY.GetChildObject(childObject5, "Block2/OthersPlayCount/Value", false).GetComponent(); this.m_lTeachRate = UTY.GetChildObject(childObject5, "Block3/TeachRate/Value", false).GetComponent(); this.m_lStudyRate = UTY.GetChildObject(childObject5, "Block3/StudyRate/Value", false).GetComponent(); GameObject childObject6 = UTY.GetChildObject(this.m_goPanel, "Hparameter/Parent", false); this.m_lHp = UTY.GetChildObject(childObject6, "Hp/Value", false).GetComponent(); this.m_lMind = UTY.GetChildObject(childObject6, "Mind/Value", false).GetComponent(); this.m_lInran = UTY.GetChildObject(childObject6, "Inran/Value", false).GetComponent(); this.m_lMValue = UTY.GetChildObject(childObject6, "MValue/Value", false).GetComponent(); this.m_lHentai = UTY.GetChildObject(childObject6, "Hentai/Value", false).GetComponent(); this.m_lHousi = UTY.GetChildObject(childObject6, "Housi/Value", false).GetComponent(); this.m_lYotogiPlayCount = UTY.GetChildObject(childObject6, "YotogiPlayCount/Value", false).GetComponent(); this.m_lAppeal = UTY.GetChildObject(this.m_goPanel, "Appeal/Appeal/Value", false).GetComponent(); GameObject childObject7 = UTY.GetChildObject(this.m_goPanel, "ErogenousZone", false); this.m_lMouth = UTY.GetChildObject(childObject7, "Grid/Mouth/Value", false).GetComponent(); this.m_lThroat = UTY.GetChildObject(childObject7, "Grid/Throat/Value", false).GetComponent(); this.m_lNipple = UTY.GetChildObject(childObject7, "Grid/Nipple/Value", false).GetComponent(); this.m_lClitoris = UTY.GetChildObject(childObject7, "Grid/Clitoris/Value", false).GetComponent(); childObject7.SetActive(false); GameObject childObject8 = UTY.GetChildObject(this.m_goPanel, "Ranking", false); this.m_goldCrownIcon = UTY.GetChildObject(childObject8, "CrownIcon/Gold", false); this.m_silverCrownIcon = UTY.GetChildObject(childObject8, "CrownIcon/Silver", false); this.m_bronzeCrownIcon = UTY.GetChildObject(childObject8, "CrownIcon/Bronze", false); this.m_dicCrownIcon = new Dictionary { { 1, this.m_goldCrownIcon }, { 2, this.m_silverCrownIcon }, { 3, this.m_bronzeCrownIcon } }; this.m_lRanking = UTY.GetChildObject(childObject8, "Value", false).GetComponent(); GameObject childObject9 = UTY.GetChildObject(this.m_goPanel, "Evaluation/Parent", false); this.m_lAcquisitionOfClientEvaluation = UTY.GetChildObject(childObject9, "AcquisitionOfClientEvaluation/Value", false).GetComponent(); this.m_lAcquisitionOfWorkingFunds = UTY.GetChildObject(childObject9, "AcquisitionOfWorkingFunds/Value", false).GetComponent(); this.m_lDaysOfEmployment = UTY.GetChildObject(this.m_goPanel, "DaysOfEmployment/Value", false).GetComponent(); if (MaidManagement.compatibilityMode) { this.m_lCooking.transform.parent.gameObject.SetActive(false); this.m_lDance.transform.parent.gameObject.SetActive(false); this.m_lVocal.transform.parent.gameObject.SetActive(false); this.m_lAppeal.transform.parent.parent.gameObject.SetActive(false); UTY.GetChildObject(childObject5, "Line2", false).transform.localPosition = new Vector3(69f, -338.3f, 0f); UTY.GetChildObject(childObject5, "Block3", false).transform.localPosition = new Vector3(0f, -369f, 0f); UTY.GetChildObject(childObject5.transform.parent.gameObject, "Frame", false).GetComponent().height = 460; childObject9.transform.parent.localPosition = new Vector3(-71f, -260f, 0f); childObject8.transform.localPosition = new Vector3(230f, -285f, 0f); childObject7.SetActive(true); } } public void CreateViewer(StatusCtrl.Status status) { if (!this.m_bInit) { this.InitViewer(); this.m_bInit = true; } this.SetData(status); } private void SetData(StatusCtrl.Status status) { this.m_txtMaidIcon.mainTexture = status.maidIcon; this.m_lFirstName.text = status.firstName; this.m_lLastName.text = status.lastName; this.m_lContractType.text = status.contractType; this.m_lPersonal.fontSize = 22; this.m_lPersonal.text = status.personal; Utility.ResizeUILabelFontSize(this.m_lPersonal, 251); this.m_lSexualExperience.text = status.sexualExperience; this.m_lMaidClass.text = status.maidClassName; this.m_lMaidClassLevel.text = status.maidClassLevel.ToString(); this.m_lMaidClassExp.text = ((status.maidClassExp >= 0) ? status.maidClassExp.ToString() : "-"); this.m_lMaidClassRequiredExp.text = ((status.maidClassRequiredExp >= 0) ? status.maidClassRequiredExp.ToString() : "-"); this.m_lYotogiClass.text = status.yotogiClassName; this.m_lYotogiClassLevel.text = status.yotogiClassLevel.ToString(); this.m_lYotogiClassExp.text = ((status.yotogiClassExp >= 0) ? status.yotogiClassExp.ToString() : "-"); this.m_lYotogiClassRequiredExp.text = ((status.yotogiClassRequiredExp >= 0) ? status.yotogiClassRequiredExp.ToString() : "-"); this.m_lHeight.text = status.height.ToString(); this.m_lWeight.text = status.weight.ToString(); this.m_lBust.text = status.bust.ToString(); this.m_lCup.text = status.cup; this.m_lWaist.text = status.waist.ToString(); this.m_lHip.text = status.hip.ToString(); this.m_lRelation.fontSize = 25; this.m_lRelation.text = status.relation; Utility.ResizeUILabelFontSize(this.m_lRelation, 152); this.m_lConditionText.fontSize = 25; this.m_lConditionText.text = status.conditionText; Utility.ResizeUILabelFontSize(this.m_lConditionText, 152); this.m_lHp.text = status.hp.ToString(); this.m_lMind.text = status.mind.ToString(); this.m_lLikability.text = status.likability.ToString(); this.m_lCare.text = status.care.ToString(); this.m_lReception.text = status.reception.ToString(); this.m_lCooking.text = status.cooking.ToString(); this.m_lDance.text = status.dance.ToString(); this.m_lVocal.text = status.vocal.ToString(); this.m_lAppeal.text = ((status.appeal >= 0) ? status.appeal.ToString() : "-"); this.m_lStudyRate.text = ((status.studyRate >= 0) ? status.studyRate.ToString() : "-"); this.m_lTeachRate.text = ((status.teachRate >= 0) ? status.teachRate.ToString() : "-"); this.m_lLovely.text = status.lovely.ToString(); this.m_lElegance.text = status.elegance.ToString(); this.m_lCharm.text = status.charm.ToString(); this.m_lInran.text = status.inran.ToString(); this.m_lMValue.text = status.mValue.ToString(); this.m_lHentai.text = status.hentai.ToString(); this.m_lHousi.text = status.housi.ToString(); this.m_lYotogiPlayCount.text = ((status.yotogiPlayCount >= 0) ? status.yotogiPlayCount.ToString() : "-"); this.m_lOthersPlayCount.text = ((status.othersPlayCount >= 0) ? status.othersPlayCount.ToString() : "-"); this.m_lMouth.text = status.mouth.ToString(); this.m_lThroat.text = status.throat.ToString(); this.m_lNipple.text = status.nipple.ToString(); this.m_lClitoris.text = status.curi.ToString(); this.m_lRanking.text = ScheduleCtrl.ConvertValueWhenDefault(status.ranking, "-"); this.m_lAcquisitionOfClientEvaluation.text = ((status.acquisitionOfClientEvaluation >= 0L) ? status.acquisitionOfClientEvaluation.ToString() : "-"); this.m_lAcquisitionOfWorkingFunds.text = ((status.acquisitionOfWorkingFunds >= 0L) ? status.acquisitionOfWorkingFunds.ToString("#,0") : "-"); this.m_lDaysOfEmployment.text = status.daysOfEmployment.ToString(); UTY.GetChildObject(this.m_goPanel, "DaysOfEmployment/Title", false).GetComponent().text = "雇用日数"; this.SetCrownIcon(status.ranking); } private void SetCrownIcon(int ranking) { foreach (KeyValuePair keyValuePair in this.m_dicCrownIcon) { if (keyValuePair.Key == ranking) { keyValuePair.Value.SetActive(true); } else { keyValuePair.Value.SetActive(false); } } } public static int ToPercent(int number, int denominator) { return (int)System.Math.Floor((double)(number / denominator)); } private StatusMgr m_mgr; private Dictionary m_dicCrownIcon; private GameObject m_goPanel; private GameObject m_goldCrownIcon; private GameObject m_silverCrownIcon; private GameObject m_bronzeCrownIcon; private UITexture m_txtMaidIcon; private UITexture m_txtCrownIcon; private UILabel m_lFirstName; private UILabel m_lLastName; private UILabel m_lContractType; private UILabel m_lPersonal; private UILabel m_lSexualExperience; private UILabel m_lMaidClass; private UILabel m_lMaidClassLevel; private UILabel m_lMaidClassExp; private UILabel m_lMaidClassRequiredExp; private UILabel m_lYotogiClass; private UILabel m_lYotogiClassLevel; private UILabel m_lYotogiClassExp; private UILabel m_lYotogiClassRequiredExp; private UILabel m_lHeight; private UILabel m_lWeight; private UILabel m_lBust; private UILabel m_lCup; private UILabel m_lWaist; private UILabel m_lHip; private UILabel m_lHp; private UILabel m_lMind; private UILabel m_lLikability; private UILabel m_lCare; private UILabel m_lReception; private UILabel m_lCooking; private UILabel m_lDance; private UILabel m_lVocal; private UILabel m_lAppeal; private UILabel m_lStudyRate; private UILabel m_lTeachRate; private UILabel m_lLovely; private UILabel m_lElegance; private UILabel m_lCharm; private UILabel m_lInran; private UILabel m_lMValue; private UILabel m_lHentai; private UILabel m_lHousi; private UILabel m_lRelation; private UILabel m_lConditionText; private UILabel m_lYotogiPlayCount; private UILabel m_lOthersPlayCount; private UILabel m_lMouth; private UILabel m_lThroat; private UILabel m_lNipple; private UILabel m_lClitoris; private UILabel m_lRanking; private UILabel m_lAcquisitionOfClientEvaluation; private UILabel m_lAcquisitionOfWorkingFunds; private UILabel m_lDaysOfEmployment; private bool m_bInit; private const int DENOMINATOR_10 = 10; public class Status { public int studyRate { get { return this._studyRate; } set { this._studyRate = StatusCtrl.ToPercent(value, 10); } } public int teachRate { get { return this._teachRate; } set { this._teachRate = StatusCtrl.ToPercent(value, 10); } } public int mouth { get { return this._mouth; } set { this._mouth = StatusCtrl.ToPercent(value, 10); } } public int throat { get { return this._throat; } set { this._throat = StatusCtrl.ToPercent(value, 10); } } public int nipple { get { return this._nipple; } set { this._nipple = StatusCtrl.ToPercent(value, 10); } } public int curi { get { return this._clitoris; } set { this._clitoris = StatusCtrl.ToPercent(value, 10); } } public Texture2D maidIcon; public string firstName; public string lastName; public string contractType; public string personal; public string sexualExperience; public string maidClassName; public int maidClassLevel; public int maidClassExp; public int maidClassRequiredExp; public string yotogiClassName; public int yotogiClassLevel; public int yotogiClassExp; public int yotogiClassRequiredExp; public int height; public int weight; public int bust; public string cup; public int waist; public int hip; public int hp; public int mind; public int likability; public int care; public int reception; public int cooking; public int dance; public int vocal; public int appeal; private int _studyRate; private int _teachRate; public int lovely; public int elegance; public int charm; public int inran; public int mValue; public int hentai; public int housi; public string relation; public string conditionText; public int yotogiPlayCount; public int othersPlayCount; private int _mouth; private int _throat; private int _nipple; private int _clitoris; public int ranking; public Texture2D crownIcon; public long acquisitionOfClientEvaluation; public long acquisitionOfWorkingFunds; public int daysOfEmployment; } }