void MapAction(interactionsP1 p1Action, interactionsP2 p2Action, sCashierAction action) { var interaction = new sDoubleInteraction() { p1Input = p1Action, p2Input = p2Action, action = action, }; m_interactionList.Add(interaction); }
void GetOrSetInteraction(interactionsP1 p1Action, interactionsP2 p2Action) { foreach (var interaction in m_interactionList) { if (p1Action == interaction.p1Input && p2Action == interaction.p2Input) { //Already Mapped GameManager.s_instance.MakeAction(interaction.action); return; } } var action = GameManager.s_instance.GetNextActionToMap(m_interactionList); if (action.eAction == eCashierActions.Count) { return; } MapAction(p1Action, p2Action, action); GameManager.s_instance.MakeAction(action); }