12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using UnityEngine;
- public class BodyStatusCtrl : MonoBehaviour
- {
- public void Init(BodyStatusMgr mgr, GameObject m_goPanel)
- {
- GameObject childObject = UTY.GetChildObject(m_goPanel, "BodySize", false);
- this.m_lHeight = UTY.GetChildObject(childObject, "Height/Value", false).GetComponent<UILabel>();
- this.m_lWeight = UTY.GetChildObject(childObject, "Weight/Value", false).GetComponent<UILabel>();
- this.m_lBust = UTY.GetChildObject(childObject, "Bust/Value", false).GetComponent<UILabel>();
- this.m_lCup = UTY.GetChildObject(childObject, "Bust/Cup/Value", false).GetComponent<UILabel>();
- this.m_lWaist = UTY.GetChildObject(childObject, "Waist/Value", false).GetComponent<UILabel>();
- this.m_lHip = UTY.GetChildObject(childObject, "Hip/Value", false).GetComponent<UILabel>();
- UIButton component = UTY.GetChildObject(m_goPanel, "Close", false).GetComponent<UIButton>();
- EventDelegate.Add(component.onClick, new EventDelegate.Callback(mgr.CloseBodyPanel));
- }
- public void SetData(BodyStatusCtrl.Status status)
- {
- 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();
- }
- private UILabel m_lHeight;
- private UILabel m_lWeight;
- private UILabel m_lBust;
- private UILabel m_lCup;
- private UILabel m_lWaist;
- private UILabel m_lHip;
- public class Status
- {
- public int height;
- public int weight;
- public int bust;
- public string cup;
- public int waist;
- public int hip;
- }
- }
|