public void Add(InteractionType type, string extradata) { string line = DateTime.Now.ToFileTimeUtc().ToString() + "," + _userid + "," + _condition + "," + type.ToString() + "," + extradata; _logger.AddLine(line); }
public void Add(InteractionType type, string extradata) { string line = DateTime.Now.ToFileTimeUtc().ToString() + "," + _userid + "," + _condition + "," + type.ToString() + "," + extradata; _logger.AddLine(line); }
private void ShowParametersGUI(ActionListAsset actionListAsset) { if (actionListAsset == null) { EditorGUILayout.HelpBox("No " + interactionType.ToString() + " ActionList found!", MessageType.Warning); return; } if (actionListAsset.useParameters && actionListAsset.parameters != null && actionListAsset.parameters.Count > 0) { ShowActionListReference(actionListAsset); ShowParametersGUI(actionListAsset.parameters, true); } else { EditorGUILayout.HelpBox("No parameters defined for ActionList Assset '" + actionListAsset.name + "'.", MessageType.Warning); } }
protected void ShowParametersGUI(ActionListAsset actionListAsset) { if (actionListAsset == null) { EditorGUILayout.HelpBox("No " + interactionType.ToString() + " ActionList found!", MessageType.Warning); return; } if (actionListAsset.NumParameters > 0) { ShowActionListReference(actionListAsset); ShowParametersGUI(actionListAsset.DefaultParameters, true); } else { EditorGUILayout.HelpBox("No parameters defined for ActionList Assset '" + actionListAsset.name + "'.", MessageType.Warning); } }
public void ShowGUI() { if (hotspot == null) { hotspot = GetComponent <Hotspot>(); } hotspot = (Hotspot)EditorGUILayout.ObjectField("Hotspot:", hotspot, typeof(Hotspot), true); if (hotspot != null) { interactionType = (InteractionType)EditorGUILayout.EnumPopup("Interaction type:", interactionType); if (interactionType == InteractionType.Use) { if (hotspot.provideUseInteraction && hotspot.useButtons != null && hotspot.useButtons.Count > 0) { string[] labelArray = new string[hotspot.useButtons.Count]; for (int i = 0; i < hotspot.useButtons.Count; i++) { string label = (KickStarter.cursorManager != null) ? i.ToString() + ": " + KickStarter.cursorManager.GetLabelFromID(hotspot.useButtons[i].iconID, 0) : i.ToString(); labelArray[i] = label; } buttonIndex = EditorGUILayout.Popup("Interaction:", buttonIndex, labelArray); ShowParametersGUI(hotspot.useButtons[buttonIndex], labelArray[buttonIndex]); return; } } else if (interactionType == InteractionType.Inventory) { if (hotspot.provideInvInteraction && hotspot.invButtons != null && hotspot.invButtons.Count > 0) { string[] labelArray = new string[hotspot.invButtons.Count]; for (int i = 0; i < hotspot.invButtons.Count; i++) { string label = (KickStarter.inventoryManager != null) ? i.ToString() + ": " + KickStarter.inventoryManager.GetLabel(hotspot.invButtons[i].iconID) : i.ToString(); labelArray[i] = label; } buttonIndex = EditorGUILayout.Popup("Interaction:", buttonIndex, labelArray); ShowParametersGUI(hotspot.invButtons[buttonIndex], labelArray[buttonIndex]); return; } } else if (interactionType == InteractionType.Examine && hotspot.provideLookInteraction && hotspot.lookButton != null) { ShowParametersGUI(hotspot.lookButton, "Examine"); return; } else if (interactionType == InteractionType.UnhandledInventory && hotspot.provideUnhandledInvInteraction && hotspot.unhandledInvButton != null) { ShowParametersGUI(hotspot.unhandledInvButton, "Unhandled inventory"); return; } EditorGUILayout.HelpBox("No interactions of type '" + interactionType.ToString() + " available!", MessageType.Warning); } }
internal static ObjectInteraction CreateObjectInteractionInternal(string id, InteractionType type, CustomNameInfo?buttonName, Func <Agent, PlayfieldObject, bool> condition, bool orig) { ObjectInteraction objectInteraction = GetObjectInteraction(id); if (objectInteraction != null) { string message = string.Concat("An ObjectInteraction with Id \"", id, "\" already exists!"); Logger.LogError(message); throw new ArgumentException(message, nameof(id)); } ObjectInteractions.Add(objectInteraction = new ObjectInteraction(id, type, buttonName.HasValue ? RogueLibs.CreateCustomName(id, "Interface", buttonName.Value) : null, orig)); objectInteraction.Condition = condition; Logger.LogDebug(string.Concat("An ObjectInteraction with Id \"", id, "\" (", type.ToString(), ") was created.")); return(objectInteraction); }
private static InteractionKineticModifications modificationsFrom(InteractionType interactionType) { return(EnumHelper.ParseValue <InteractionKineticModifications>(interactionType.ToString())); }
public virtual string GetInfo() { return(InteractionType.ToString()); }
/// <summary> /// Apply interaction to Cat /// </summary> public void Interact(InteractionType interaction) { Debug.Log($"Interaction: {interaction}"); _animator.SetTrigger(interaction.ToString()); }
void ProcessInteraction(ulong userId, InteractionType interType, JointType hand) { var handStr = hand == JointType.HandLeft ? " LEFT " : (hand == JointType.HandRight ? " RIGHT " : " "); Debug.WriteLine(userId + handStr + interType.ToString()); switch (interType) { case InteractionType.GRAB: scene.SetGrabState(userId, hand, enabled: true); break; case InteractionType.RELEASE: scene.SetGrabState(userId, hand, enabled: false); break; case InteractionType.BEGIN_DRAW: scene.SetDrawingState(userId, hand, enabled: true, SELECTABLE_COLORS[selectedColorIdx]); break; case InteractionType.END_DRAW: scene.SetDrawingState(userId, hand, enabled: false); break; case InteractionType.BEGIN_CREATING_OBJECT: var shape = gameMode == GameMode.SANDBOX ? SELECTABLE_SHAPES[selectedShapeIdx] : Shape.RANDOM; var color = gameMode == GameMode.SANDBOX ? SELECTABLE_COLORS[selectedColorIdx] : Color.RANDOM; scene.BeginCreatingObject(userId, shape, color); break; case InteractionType.FINISH_CREATING_OBJECT: scene.FinishCreatingObject(userId); break; case InteractionType.PEEK_MENU: menuInterUserId = userId; menuInterHand = hand; PeekMenu(); break; case InteractionType.CANCEL_PEEK_MENU: CancelPeekMenu(); break; case InteractionType.GRAB_MENU: menuInterHand = hand; menuGrabbing = true; break; case InteractionType.RELEASE_MENU_SHOW: menuGrabbing = false; ShowMenu(); break; case InteractionType.RELEASE_MENU_CANCEL: menuGrabbing = false; HideMenu(); break; case InteractionType.BEGIN_REACH_MARGIN: if (gameMode == GameMode.SANDBOX) { gameView.Button_MouseDown(hand == JointType.HandLeft ? gameView.shapeBtn : gameView.colorBtn, null); } else { howItWorksView.Button_MouseDown(hand == JointType.HandLeft ? howItWorksView.backBtn : howItWorksView.nextBtn, null); } break; case InteractionType.END_REACH_MARGIN: if (gameMode == GameMode.SANDBOX) { gameView.Button_MouseUp(hand == JointType.HandLeft ? gameView.shapeBtn : gameView.colorBtn, null); } else { howItWorksView.Button_MouseUp(hand == JointType.HandLeft ? howItWorksView.backBtn : howItWorksView.nextBtn, null); } break; case InteractionType.IDLE_TIMEOUT: if (menuShown) { SetGameMode(ACTIVE_GAME_MODES.Rnd()); HideMenu(); } else { ShowMenu(); } break; default: break; } }