public bool GetBundleItem(Item item) //번들 체크 하는 함수 { Item CurrentItem; ItemSlot CurrentSlot; for (int i = 0; i < Max; i++) { if (!ItemList[i].GetComponent <ItemSlot>().IsEmpty) { CurrentItem = getItem(i); CurrentSlot = getslot(i); if (CurrentItem.ItemName.Equals(item.ItemName) && CurrentSlot.IsBundleFull()) //번들이 꽉차면 일단 밴 { continue; } else if (CurrentItem.ItemName.Equals(item.ItemName) && !CurrentSlot.IsBundleFull()) //꽉차지 않은 자기자신의 번들이 있으면 트루반환 { return(true); } else { continue; } } } return(false); }
/// <summary> /// General function to activate the item's UIInteract /// This is the same as clicking the item with the same item's hand /// </summary> public void Activate() { // Is there an item in the active hand? if (!CurrentSlot.IsFull) { return; } CurrentSlot.TryItemInteract(); }
/// <summary> /// General function to activate the item's UIInteract /// This is the same as clicking the item with the same item's hand /// </summary> public void Activate() { if (!isValidPlayer()) { return; } // Is there an item in the active hand? if (CurrentSlot.Item == null) { return; } CurrentSlot.TryItemInteract(); }
public async Task Syncing_DeserializeWithStatus() { // Arrange JsonSerializerOptions options = new JsonSerializerOptions(); options.ConfigureNethermindCore2(); string jsonString = "{\"is_syncing\":true,\"sync_status\":{\"current_slot\":2,\"highest_slot\":3,\"starting_slot\":1}}"; // Act - deserialize from string await using MemoryStream memoryStream = new MemoryStream(Encoding.UTF8.GetBytes(jsonString)); Syncing syncing = await JsonSerializer.DeserializeAsync <Syncing>(memoryStream, options); syncing.IsSyncing.ShouldBeTrue(); syncing.SyncStatus !.CurrentSlot.ShouldBe(new Slot(2)); }
private void DoDraw(int id) { GUILayout.BeginVertical(); { UnityEngine.GUI.changed = true; // Header GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.FlexibleSpace(); if (GUILayout.Button("Close Me", GUILayout.ExpandWidth(false))) { enabled = false; } GUILayout.EndHorizontal(); // Render Options // Clothing Slot Options GUILayout.BeginVertical(UnityEngine.GUI.skin.box); { GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.Label("Hide When ANY of the Following Clothing Slot States are Set", GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); TOP_ON = GUILayout.Toggle(TOP_ON, "TOP ON"); TOP_HALF = GUILayout.Toggle(TOP_HALF, "TOP HALF"); TOP_OFF = GUILayout.Toggle(TOP_OFF, "TOP OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); BOT_ON = GUILayout.Toggle(BOT_ON, "BOT ON"); BOT_HALF = GUILayout.Toggle(BOT_HALF, "BOT HALF"); BOT_OFF = GUILayout.Toggle(BOT_OFF, "BOT OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); INNER_TOP_ON = GUILayout.Toggle(INNER_TOP_ON, "INNER TOP ON"); INNER_TOP_HALF = GUILayout.Toggle(INNER_TOP_HALF, "INNER TOP HALF"); INNER_TOP_OFF = GUILayout.Toggle(INNER_TOP_OFF, "INNER TOP OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); INNER_BOT_ON = GUILayout.Toggle(INNER_BOT_ON, "INNER BOT ON"); INNER_BOT_HALF = GUILayout.Toggle(INNER_BOT_HALF, "INNER BOT HALF"); INNER_BOT_OFF = GUILayout.Toggle(INNER_BOT_OFF, "INNER BOT OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); PANTYHOSE_ON = GUILayout.Toggle(PANTYHOSE_ON, "PANTYHOSE ON"); PANTYHOSE_HALF = GUILayout.Toggle(PANTYHOSE_HALF, "PANTYHOSE HALF"); PANTYHOSE_OFF = GUILayout.Toggle(PANTYHOSE_OFF, "PANTYHOSE OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); GLOVE_ON = GUILayout.Toggle(GLOVE_ON, "GLOVES ON"); GLOVE_OFF = GUILayout.Toggle(GLOVE_OFF, "GLOVES OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); SOCK_ON = GUILayout.Toggle(SOCK_ON, "SOCKS ON"); SOCK_OFF = GUILayout.Toggle(SOCK_OFF, "SOCKS OFF"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); SHOE_ON = GUILayout.Toggle(SHOE_ON, "SHOES ON"); SHOE_OFF = GUILayout.Toggle(SHOE_OFF, "SHOES OFF"); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.BeginVertical(UnityEngine.GUI.skin.box); { GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.BeginVertical(GUILayout.ExpandHeight(false)); GUILayout.Label("Link to Status of Specified Slot # (Empty slots always counts as Not Visible\nLinks can be chained, limited to 20 deep. Bi-Directional Links don't function. Pick one relationship direction.)", GUILayout.ExpandWidth(false)); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); GUILayout.BeginVertical(GUILayout.ExpandHeight(false)); LINK_ACCESSORY = GUILayout.Toggle(LINK_ACCESSORY, "Link"); INVERSE_LINK_ACCESSORY = GUILayout.Toggle(INVERSE_LINK_ACCESSORY, "Inverse Link"); GUILayout.EndVertical(); scrollPosition = GUILayout.BeginScrollView(scrollPosition, GUILayout.Width(500), GUILayout.Height(60)); GUILayout.BeginVertical(); string[] availableSlots = AvailableSlots(); for (int index = 0; index < availableSlots.Length;) { GUILayout.BeginHorizontal(GUILayout.ExpandWidth(false)); for (int i = 0; i < 5 && index < availableSlots.Length; i++, index++) { bool selected = GUILayout.Button(availableSlots[index], (availableSlots[index].Equals(accessorySlotString)) ? selectedButtonStyle : UnityEngine.GUI.skin.button); if (selected) { accessorySlotString = availableSlots[index]; if (CurrentSlot.ContainsVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_LINK)) { CurrentSlot.ClearVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_LINK); CurrentSlot.SetVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_LINK, accessorySlotString, true); SendRulesUpdateNotification(); } else if (CurrentSlot.ContainsVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_INVERSE_LINK)) { CurrentSlot.ClearVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_INVERSE_LINK); CurrentSlot.SetVisibilityRule(AdditionalAccessoryVisibilityRules.ACCESSORY_INVERSE_LINK, accessorySlotString, true); SendRulesUpdateNotification(); } } } GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.EndScrollView(); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.BeginVertical(UnityEngine.GUI.skin.box); { GUILayout.BeginHorizontal(expandLayoutOption); STUDIO_LOAD = GUILayout.Toggle(STUDIO_LOAD, "Apply Rules on Studio Scene Character/Outfit Change (Normally Skipped) - Initial Scene State is Preserved"); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.BeginVertical(UnityEngine.GUI.skin.box); { GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.Label("Hide or Show On Lifecycle Events", GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.Label("Startup is Onload - First entry into any scene. Studio is excluded (unless above option is selected).", GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); HIDE_ON_STARTUP = GUILayout.Toggle(HIDE_ON_STARTUP, "Hide on Startup (Defaults to Hidden)"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.Label("H Scene Start is after initial conversation, before first sex animation (use Startup for initial conversation).", GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); HIDE_ON_HSTART = GUILayout.Toggle(HIDE_ON_HSTART, "Hide on H Scene Start"); SHOW_ON_HSTART = GUILayout.Toggle(SHOW_ON_HSTART, "Show on H Scene Start"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.Label("H Scene End is before final conversation", GUILayout.ExpandWidth(false)); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(); HIDE_ON_HEND = GUILayout.Toggle(HIDE_ON_HEND, "Hide on H Scene End"); SHOW_ON_HEND = GUILayout.Toggle(SHOW_ON_HEND, "Show on H Scene End"); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); GUILayout.BeginVertical(UnityEngine.GUI.skin.box); { GUILayout.BeginHorizontal(expandLayoutOption); GUILayout.BeginVertical(GUILayout.ExpandHeight(false)); GUILayout.Label("Hide Specified Hair/Body Part when this Accessorial is Visible\nNote: Hair is invisible but present. Body parts are scaled to 0.", GUILayout.ExpandWidth(false)); GUILayout.EndVertical(); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); HIDE_BACK_HAIR = GUILayout.Toggle(HIDE_BACK_HAIR, "Hair Back"); HIDE_FRONT_HAIR = GUILayout.Toggle(HIDE_FRONT_HAIR, "Hair Front"); HIDE_SIDE_HAIR = GUILayout.Toggle(HIDE_SIDE_HAIR, "Hair Side"); HIDE_EXT_HAIR = GUILayout.Toggle(HIDE_EXT_HAIR, "Hair Extension"); HIDE_ACC_HAIR = GUILayout.Toggle(HIDE_ACC_HAIR, "Hair Accessories"); GUILayout.EndHorizontal(); GUILayout.BeginHorizontal(expandLayoutOption); HIDE_NOSE = GUILayout.Toggle(HIDE_NOSE, "Nose"); HIDE_LEFT_EAR = GUILayout.Toggle(HIDE_LEFT_EAR, "L Ear"); HIDE_RIGHT_EAR = GUILayout.Toggle(HIDE_RIGHT_EAR, "R Ear"); HIDE_LEFT_HAND = GUILayout.Toggle(HIDE_LEFT_HAND, "L Hand"); HIDE_RIGHT_HAND = GUILayout.Toggle(HIDE_RIGHT_HAND, "R Hand"); HIDE_LEFT_FOOT = GUILayout.Toggle(HIDE_LEFT_FOOT, "L Foot"); HIDE_RIGHT_FOOT = GUILayout.Toggle(HIDE_RIGHT_FOOT, "R Foot"); HIDE_LEFT_EYELASH = GUILayout.Toggle(HIDE_LEFT_EYELASH, "L Eyelash"); HIDE_RIGHT_EYELASH = GUILayout.Toggle(HIDE_RIGHT_EYELASH, "R Eyelash"); GUILayout.EndHorizontal(); } GUILayout.EndVertical(); } GUILayout.EndVertical(); UnityEngine.GUI.DragWindow(); }