public void Show() { isShowing = true; TweenAlpha.Begin(gameObject, 0.1f, 1); if (GameApp.Instance.PlayerData != null) { switch ((ActionType)GameApp.Instance.PlayerData.m_player_action.m_type) { case ActionType.ActionType_Travel: PrepareRoot.transform.localPosition = Vector3.zero; PackageRoot.gameObject.SetActive(false); PrepareRoot.gameObject.SetActive(true); break; case ActionType.ActionType_Playing: PackageRoot.transform.localPosition = Vector3.zero; PrepareRoot.transform.localPosition = new Vector3(1100, 0, 0); PackageRoot.gameObject.SetActive(true); PrepareRoot.gameObject.SetActive(true); break; } PlayerTravelBag ptb = GameApp.Instance.PlayerData.m_player_travel_bag; for (int i = 0; i < ptb.m_items.Count; i++) { PlayerTravelBagItem ptbi = ptb.m_items[i]; ItemConfig ItemCfg = null; CsvConfigTables.Instance.ItemCsvDic.TryGetValue(SerPlayerData.SerIDToItemID(ptbi.m_item_id), out ItemCfg); if (ItemCfg != null) { GameObject GridInfoObj = null; switch ((PosType)ptbi.m_id) { case PosType.PosType_Bag_Food: GridInfoObj = PackageRoot.transform.Find("Grid_Package_Food").gameObject; break; case PosType.PosType_Bag_Luck: GridInfoObj = PackageRoot.transform.Find("Grid_Package_Lucky").gameObject; break; case PosType.PosType_Bag_Equip1: GridInfoObj = PackageRoot.transform.Find("Grid_Package_Equipment1").gameObject; break; case PosType.PosType_Bag_Equip2: GridInfoObj = PackageRoot.transform.Find("Grid_Package_Equipment2").gameObject; break; case PosType.PosType_Home_Food1: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Food1").gameObject; break; case PosType.PosType_Home_Food2: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Food2").gameObject; break; case PosType.PosType_Home_Luck1: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Lucky1").gameObject; break; case PosType.PosType_Home_Luck2: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Lucky2").gameObject; break; case PosType.PosType_Home_Equip1: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Equipment1").gameObject; break; case PosType.PosType_Home_Equip2: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Equipment2").gameObject; break; case PosType.PosType_Home_Equip3: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Equipment3").gameObject; break; case PosType.PosType_Home_Equip4: GridInfoObj = PrepareRoot.transform.Find("Grid_Prepare_Equipment4").gameObject; break; default: break; } CreateGridInfo(GridInfoObj, new GridInfo(ptbi.m_item_id, ItemCfg.Icon)); } } } }