示例#1
0
 private void CreateAndInitTravelOptions(TravelTo i_travelTo)
 {
     foreach (TravelOption option in i_travelTo.TravelOptions)
     {
         GameObject       optionObject = gameObject.InstantiateUI(TravelOptionPrefab, TravelOptionContent);
         TravelOptionView optionView   = optionObject.GetComponent <TravelOptionView>();
         optionView.Init(option);
     }
 }
示例#2
0
        private void CreateTravelToView()
        {
            TravelTo travelTo = new TravelTo(PlayerManager.Data.GetMapDataForWorld(BackendConstants.WORLD_BASE));

            GameObject   mainCanvas = GameObject.FindGameObjectWithTag("MainCanvas");
            GameObject   travelToUI = gameObject.InstantiateUI(TravelToPopupPrefab, mainCanvas);
            TravelToView view       = travelToUI.GetComponent <TravelToView>();

            view.Init(travelTo);
        }
示例#3
0
 public void Init(TravelTo i_travelTo)
 {
     SetModel(i_travelTo.ViewModel);
     SubscribeToMessages();
     CreateAndInitTravelOptions(i_travelTo);
 }