public static bool FindAllHerPairs(UiCellphoneAppPairs __instance) { if (currentGirl != null) { int num = 0; List <GirlPairDefinition> stockPairs = Game.Data.GirlPairs.GetAllBySpecial(false); for (int i = 0; i < stockPairs.Count; i++) { if (stockPairs[i].HasGirlDef(currentGirl)) { __instance.pairSlots[num].rectTransform.anchoredPosition = new Vector2((float)(num % 4) * 256f, (float)Mathf.FloorToInt((float)num / 4f) * -90f); __instance.pairSlots[num].Populate(stockPairs[i], null); __instance.pairSlots[num].profileLinked = true; __instance.pairSlots[num].PairSlotPressedEvent += BasePatches.OnPairSlotPressed; __instance.pairSlots[num].button.Enable(); num++; } } for (int i = num; i < __instance.pairSlots.Length; i++) { __instance.pairSlots[i].Populate(null, null); } __instance.pairSlotsContainer.anchoredPosition += new Vector2((float)Mathf.Min(num - 1, 3) * -128f, (float)Mathf.Max(Mathf.CeilToInt((float)num / 4f) - 1, 0) * 45f); currentGirl = null; return(false); } return(true); }
public static void OnGirlHeadPressed(ButtonBehavior b) { tooltip.Hide(); Game.Manager.Audio.Play(AudioCategory.SOUND, click, Game.Session.gameCanvas.cellphone.pauseBehavior.pauseDefinition); currentGirl = Game.Data.Girls.Get(Game.Session.gameCanvas.cellphone.GetCellFlag("profile_girl_id")); UiCellphoneAppPairs p = (Game.Session.gameCanvas.cellphone.appPrefabs.FirstOrDefault((UiCellphoneApp a) => a is UiCellphoneAppPairs) as UiCellphoneAppPairs); Game.Session.gameCanvas.cellphone.LoadApp(Game.Session.gameCanvas.cellphone.appPrefabs.IndexOf(p)); }