コード例 #1
0
 // Use this for initialization
 void Start()
 {
     MainbabyUI.Instance.listObj.SetActive(true);
     item.SetActive(false);
     isBattle         = GamePlayer.Instance.isInBattle;
     grid             = GetComponentInChildren <UIGrid> ();
     babylist         = GamePlayer.Instance.babies_list_;
     changeBabyNameOk = NameBabyChange;
     Refresh();
     CrtSelectIdx = 0;
     AddItems(babylist);
     BabyFightingStandby     = BabyFightingState;
     RefreshBabyListOk      += RefreshBabyListUI;
     MainbabyUI.OnoffmakeOk += NewBabyMakeOff;
     UpdateBabyListUIOk      = UpdateBabyListUI;
     RefreshBabyOk           = RefreshBabyUIOk;
     SetBabyListLockUIOk     = BabyListLockUIOk;
     if (GamePlayer.Instance.babies_list_.Count == 0)
     {
         modelRace_.mainTexture = null;
         raceLabel.text         = "";
     }
     GamePlayer.Instance.OnShowBaby = ShowBaby;
     // hasDestroy = true;
 }
コード例 #2
0
 void OnDestroy()
 {
     hasDestroy                     = true;
     isHid                          = true;
     changeBabyNameOk               = null;
     BabyFightingStandby            = null;
     SetBabyListLockUIOk            = null;
     GamePlayer.Instance.OnShowBaby = null;
     RefreshBabyListOk             -= RefreshBabyListUI;
     MainbabyUI.OnoffmakeOk        -= NewBabyMakeOff;
     itemsList.Clear();
     GamePlayer.Instance.OnShowBaby = null;
     PlayerAsseMgr.DeleteAsset((ENTITY_ID)asssid, true);
     for (int n = 0; n < _icons.Count; n++)
     {
         HeadIconLoader.Instance.Delete(_icons[n]);
     }
 }
コード例 #3
0
 void Start()
 {
     UIManager.SetButtonEventHandler(enterBtn.gameObject, EnumButtonEvent.OnClick, OnClickEnter, 0, 0);
     UIManager.SetButtonEventHandler(CanelBtn.gameObject, EnumButtonEvent.OnClick, OnClickCanel, 0, 0);
     babyChangeName = ChangeName;
 }