public void DoAction() { GameObject obj = null; switch (interactionIndex) { case (int)NetworkCard.CardIndex.DISCARDCARD: obj = Instantiate(cardSelection, null); obj.GetComponent <TutorialCardSelection>().StartCardSelection(interactionIndex, selectedPlayerIndex, originalCardIndex); cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.MOVEFORWARD: nextSpace = players[selectedPlayerIndex].GetComponent <TutorialPlayer>().WaypointIndex; players[selectedPlayerIndex].GetComponent <TutorialPlayer>().WaypointIndex += 2; if (players[selectedPlayerIndex].GetComponent <TutorialPlayer>().WaypointIndex > waypoints.Length - 1) { players[selectedPlayerIndex].GetComponent <TutorialPlayer>().WaypointIndex = players[selectedPlayerIndex].GetComponent <TutorialPlayer>().WaypointIndex - waypoints.Length; pointSystem.AddPoints(selectedPlayerIndex, ONECYCLEPOINTS); } moveInteracting = true; cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.DRAWCARD: cardPanel.RemoveCard(); cardPanel.CmdActionDrawCard(); break; case (int)NetworkCard.CardIndex.SWITCHPOSITION: Vector3 prevPos = players[playerTurnIndex].transform.position; int prevWaypoint = players[playerTurnIndex].WaypointIndex; players[playerTurnIndex].transform.position = players[selectedPlayerIndex].transform.position; players[playerTurnIndex].WaypointIndex = players[selectedPlayerIndex].WaypointIndex; players[selectedPlayerIndex].transform.position = prevPos; players[selectedPlayerIndex].WaypointIndex = prevWaypoint; cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.SWITCHCARD: obj = Instantiate(cardSelection, null); obj.GetComponent <TutorialCardSelection>().SwitchCards(interactionIndex, selectedPlayerIndex, originalCardIndex, playerTurnIndex); cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.DUELCARD: cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.STEALCARD: obj = Instantiate(cardSelection, null); obj.GetComponent <TutorialCardSelection>().StartCardSelection(interactionIndex, selectedPlayerIndex, originalCardIndex); cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.SKIPTURN: players[selectedPlayerIndex].Skip = true; cardPanel.RemoveCard(); break; case (int)NetworkCard.CardIndex.UPGRADETILE: upgradeTile = true; break; } cardPanel.Interacting = false; }