Suitcase full of Games

Allow me start by saying that I’m not allowed to use the proper name of the product because the name is a trade secret. Therefor I’m using the name “Suitcase full of games” since it’s a real suitcase with games.

This game was designed for children with mental disabilities. By letting the children play this game they can learn numbers, colours, vehicles and shapes by having fun. This project was a lot like Bimii, also developed by Mediaheads. If you require more in-depth information, please visit www.Bimii.nl. The suitcase full of games consists of a self-made laptop with a scanner developed by Mediaheads, a suitcase with blocks displaying an image and six games with multiple difficulties.

This was my second and first big project during my internship at Mediaheads. I have worked on this project with a team of seven highly driven game developers/designers. We all worked very hard to complete this project in a time space of roughly four months. I developed two out of the six games present in the suitcase and I also made a couple of animations for the vehicles present in the other games. The first game I developed is a math game where the player must count cars which will park in one of the 12 available parking spots. If the player knows the answer, he or she must find the block displaying the answer and place the block on the scanner. When the answer is correct the cars drive off and a new question will start. If the answer is incorrect the player will know by an audio warning and must try again. This game includes three difficulty levels, easy, normal and hard. On “easy” all the cars with every colour must be counted, with a maximum of six cars. On “normal” the players must count all the cars with every colour ranging from five to 12. And on “hard” the player must count all the cars with a specific colour, with a maximum of eight cars.

The second game is a dance game, much like Simon Says. This game uses a dance pad on which the player must stand. The dance pad has four colours which all have their own ID this so that the game recognises on which colour the player stands. On screen the player will see a character performing a dance/question by stepping on different coloured pads. After the character is done performing a dance, the player must copy the dance by stepping on the correct colours of the pad. When the player completes a dance/question a next one will start until a specific number of dances are completed. This game equally includes three difficulties levels, for every harder difficulty more “dances” are required to complete the game and the “dances” consist of more steps to copy.

Every game in the suitcase implemented the same framework (written by a colleague). This framework maintains track of the flow of the game so that all the games start with a question, and to make sure that after every right answer a new question will be asked. Or in case of an incorrect answer, that the question will be repeated. But this framework only accepted one answer per question, and since one dance/question consists of multiple steps/answers I had to completely rewrite this framework, this to make sure the framework would accept multiple answers per question.

I immensely liked working on this project for multiple reasons, it challenged me in a way I was never challenged before by working with a framework, IDs, complex models, animations and a scanner which had to communicate with the game. Plus, this was my first big project with a large team in commission of a massive company. And most importantly because I am content with how the games turned out in the end.

Koffer1PNG

Koffer2PNG

Koffer3

Koffer4

*This is one of the many script I created. I cannot post any more because of the trade secret.*

SuitcaseMath.cs
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using Controller; using Game.Voertuigen; using MhGameFramework.Data; namespace Game.SuitcaseMath { public class SuitcaseMath : GameController { [Header("Suitcase Math")] public BlockData[] EligibleBlocks; [Space] public GameObject[] TopSpawnPoints; public GameObject[] BottomSpawnPoints; [Space] public GameObject[] NormalCars; public GameObject[] CabrioCars; [Space] public VehicleSpawner VehicleSpawnerScript; [HideInInspector] public bool CanStartHonking; [SerializeField] private float timeToClearCars; [SerializeField] private float timeToSpawnCars; private GameObject cloneCar; private int randomPointTop; private int answer; private int nextTopPosCount; private int nextBottomPosCount; private int maxSpots = 6; private int minSpots; private int topSpot; private int bottomSpot; private int amountTop; private int amountBottom; private int carTopColor; private int carBottomColor; private int Spot; private bool easy; private bool normal; private bool hard; private List<int> easyListTop; private List<int> easyListBottom; private List<int> topSpotList; private List<int> bottomSpotList; private List<int> carColorList; private bool canDoIntro = false; /// <summary> /// In here we check what difficulty is being used and set the blocksIdsEligible acording to the difficulty. /// </summary> public override void Start() { SetReferences(); CheckForDifficulty(); SetBlockIdsEligible(); blocks = PickBlocksToUse(blocks, blocks.Length, true, true); base.Start(); canDoIntro = true; } void Update() { if (canDoIntro) { AudioClip clip = audioController.GetRandomClip(audioPack.AudioIntro); coach.Message(0f, clip, 0f, guiController.gameObject, "ShowConfirm", Coach.Type.INTRO); canDoIntro = false; } } /// <summary> /// Handles the normal EnableInput and set the bool true to start honking /// </summary> public override void EnableInput() { CanStartHonking = true; base.EnableInput(); } /// <summary> /// Handles the normal DisableInput and set the bool false so you can no longer honk while the input is disabled /// </summary> public override void DisableInput() { CanStartHonking = false; base.DisableInput(); } /// <summary> /// Here we check what difficulty is playing before we ask the question for that specific difficulty. /// </summary> public override void AskQuestion() { if (blockQuestion == null) { LogController.Error(LogController.Type.GameController, "No question selected to ask"); return; } if (!helping) { SetAnswer(1); if (easy == true) { EasyGame(); } else if (normal == true) { NormalGame(); } else if (hard == true) { HardGame(); } } if (monitoring.idDifficulty == 2) { coach.Message(0f, audioPack.AudioQuestion[0], 0f, this.gameObject, "", Coach.Type.QUESTION); coach.Message(0f, audioPack.AudioOptional2[carTopColor], 0f, this.gameObject, "", Coach.Type.QUESTION); coach.Message(0f, audioPack.AudioQuestion[1], 0f, this.gameObject, "EnableInput", Coach.Type.QUESTION); } else { AudioClip clip = audioController.GetRandomClip(audioPack.AudioQuestion); coach.Message(0f, clip, 2f, this.gameObject, "EnableInput", Coach.Type.QUESTION); } } public override void AnswerCorrect () { StartCoroutine (WaitForCarClear ()); // Sets input visualisation object ready GameObject block = feedbackController.NewBlock(); // Get script for feedback visualisation FeedbackBlock fbb = block.GetComponent<FeedbackBlock>(); // Set values fbb.SetValues(feedbackController.blockSprites[0], blockInput.Texture, false); // Start feedback visualisation fbb.InputShow(); // Play audio clips with triggers for further visualisation //audioController.QueueAudio(fbb.timeShow, idData.Audio, 0f, block, "InputReveal"); //audioController.QueueAudio(0f, null, 0f, guiController.gameObject, "SetPointsAsScore"); AudioClip clip = audioController.GetRandomClip(audioPack.AudioCorrect); //audioController.QueueAudio(fbb.timeReveal, clip, 0f, block, "InputHide"); coach.Message(fbb.timeShow, blockInput.Audio, 0f, block, "InputReveal", Coach.Type.INPUT); audioController.QueueAudio(0f, sfxCorrect, 0f, guiController.gameObject, "SetPointsAsScore"); coach.Message(fbb.timeReveal, clip, 0f, block, "InputHide", Coach.Type.FBCORRECT); // If game is finished if (numberPoints >= numberTotalQuestions) { // Log LogController.Info(LogController.Type.GameController, "Game is finished"); // Set bool gameCompleted = true; // Queue empty AudioClip to time the GameFinished function call after the feedback visualisation audioController.QueueAudio(fbb.timeHide, null, 0f, this.gameObject, "GameFinished"); } else { audioController.QueueAudio(fbb.timeHide, null, 0.6f, this.gameObject, "NextQuestion"); } } public override void AnswerIncorrect() { // Sets input visualisation object ready GameObject block = feedbackController.NewBlock(); // Get script for feedback visualisation FeedbackBlock fbb = block.GetComponent<FeedbackBlock>(); // Set values fbb.SetValues(feedbackController.blockSprites[2], blockInput.Texture, false); // Start feedback visualisation fbb.InputShow(); // Play audio clips with triggers for further visualisation //audioController.QueueAudio(fbb.timeShow, idData.Audio, 0f, block, "InputReveal"); if (hard) { int r = Random.Range(0, audioPack.AudioIncorrect.Length); Debug.Log(r); coach.Message(fbb.timeShow, blockInput.Audio, 0f, block, "InputReveal", Coach.Type.INPUT); audioController.QueueAudio(0, sfxIncorrect, 0f, null, ""); coach.Message(fbb.timeReveal, audioPack.AudioIncorrect[r], 0f, block, "", Coach.Type.FBINCORRECT); coach.Message(0f, audioPack.AudioOptional2[carTopColor], 0f, block, "", Coach.Type.FBINCORRECT); coach.Message(0f, audioPack.AudioOptional1[r], 0f, block, "InputHide", Coach.Type.FBINCORRECT); } else { AudioClip clip = audioController.GetRandomClip(audioPack.AudioIncorrect); //audioController.QueueAudio(fbb.timeReveal, clip, 0f, block, "InputHide"); coach.Message(fbb.timeShow, blockInput.Audio, 0f, block, "InputReveal", Coach.Type.INPUT); audioController.QueueAudio(0, sfxIncorrect, 0f, null, ""); coach.Message(fbb.timeReveal, clip, 0f, block, "InputHide", Coach.Type.FBINCORRECT); } // Queue empty AudioClip to time the EnableInput function call after the feedback visualisation audioController.QueueAudio(fbb.timeHide, null, 0f, this.gameObject, "EnableInput"); } /// <summary> /// Here is where we set which block we want to use for our questions. /// </summary> public void SetBlockIdsEligible() { if (easy == true) { SetBlockEligible(6, 0); } else if (normal == true) { SetBlockEligible(8, 4); } else if (hard == true) { SetBlockEligible(8, 0); } } /// <summary> /// This is where we will check which difficulty is being played with. /// </summary> public void CheckForDifficulty() { if (monitoring.idDifficulty == 0) { easy = true; Debug.Log("Difficulty = 0"); } else if (monitoring.idDifficulty == 1) { normal = true; Debug.Log("Difficulty = 1"); } else if (monitoring.idDifficulty == 2) { hard = true; Debug.Log("Difficulty = 2"); } } /// <summary> /// here we have all our logic for the easy difficulty. /// </summary> public void EasyGame() { int min = 1; //if the answer is 1 we want to spawn a random colored vihicle on a random spot on the top row. if (answer == 1) { min = 0; int CabrioOrCar = Random.Range(0, 2); randomPointTop = Random.Range(0, TopSpawnPoints.Length - min); if (CabrioOrCar == 0) { VehicleSpawnerScript.SpawnVehicle(CabrioCars[Random.Range(0, CabrioCars.Length)], TopSpawnPoints[randomPointTop].transform.position, 90f, false, false); } else if (CabrioOrCar == 1) { VehicleSpawnerScript.SpawnVehicle(NormalCars[Random.Range(0, NormalCars.Length)], TopSpawnPoints[randomPointTop].transform.position, 90f, false, false); } } // If the answer is 2 or higher we want to spawn the vihicles next to eachother on the top or bottom row. else if (answer >= 2) { //List being used to save the spot on each row we choose, and spawn the remaining vihicles next to other cars. easyListTop = new List<int>(); easyListBottom = new List<int>(); //List used to choose a color for a single row and delete the option used so each row wont have the same color as the other. carColorList = new List<int> {0, 1, 2, 3, 4, 5 }; nextTopPosCount = 0; nextBottomPosCount = 0; amountTop = Random.Range(1, answer); amountBottom = answer - amountTop; topSpot = Random.Range(0, TopSpawnPoints.Length - amountTop + 1); bottomSpot = Random.Range(0, BottomSpawnPoints.Length - amountBottom + 1); carTopColor = Random.Range(0,carColorList.Count); //filling the top List used for spawning cars next to eachother. for (int i = 0; i < amountTop; i++) { topSpot = topSpot + nextTopPosCount; easyListTop.Add(topSpot); nextTopPosCount = 1; } carColorList.Remove(carTopColor); carBottomColor = carColorList[Random.Range(0, carColorList.Count)]; //filling the bottom List used for spawning cars next to eachother. for (int i = 0; i < amountBottom; i++) { bottomSpot = bottomSpot + nextBottomPosCount; easyListBottom.Add(bottomSpot); nextBottomPosCount = 1; } //coroutine for spawning the vihicle. StartCoroutine(WaitForCarSpawnTop(NormalCars, amountTop, carTopColor, 90f,easyListTop)); StartCoroutine(WaitForCarSpawnBottom(NormalCars, amountBottom, carBottomColor,-90f,easyListBottom)); } } /// <summary> /// all the logic for the normal difficulty game. /// </summary> public void NormalGame() { //if the answer is 5 or 6 we need a List for all the available spots and delete one if we choose it so we wont get 2 cars on 1 spot if (answer == 5 || answer == 6) { amountTop = Random.Range(1, answer); amountBottom = answer - amountTop; //List with all available spots topSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; bottomSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; //List with car colors. carColorList = new List<int> { 0, 1, 2, 3, 4, 5 }; Debug.Log("Spawning " + amountTop + " Cars At The Top"); Debug.Log("Spawning " + amountBottom + " Cars At The Bottom"); //Coroutine for spawning cars on random spots with random colors. StartCoroutine(WaitForCarSpawnTop(NormalCars, amountTop, Random.Range(0, carColorList.Count), 90f, topSpotList)); StartCoroutine(WaitForCarSpawnBottom(NormalCars, amountBottom, Random.Range(0, carColorList.Count), -90f, bottomSpotList)); } //if the answer is greater than 6 need to random pick an amount of cars we want to spawn on the top row wich has to be //greater than the answer minus the max spots available and smaller than the max spots in order to get enough at the bottom. if (answer > 6) { minSpots = answer - maxSpots; amountTop = Random.Range(minSpots, maxSpots + 1); amountBottom = answer - amountTop; //List with available spots topSpotList = new List<int> { 0, 1, 2, 3, 4, 5}; bottomSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; //List with different coloured cars carColorList = new List<int> { 0, 1, 2, 3, 4, 5 }; Debug.Log("Spawning " + amountTop + " Cars At The Top"); Debug.Log("Spawning " + amountBottom + " Cars At The Bottom"); //Coroutine for spawning cars on random spots with random colors StartCoroutine(WaitForCarSpawnTop(NormalCars, amountTop, Random.Range(0, carColorList.Count), 90f, topSpotList)); StartCoroutine(WaitForCarSpawnBottom(NormalCars, amountBottom, Random.Range(0, carColorList.Count), -90f, bottomSpotList)); } } /// <summary> /// all the logic for the hard difficulty game /// </summary> public void HardGame() { //if the answer is less or equal to 6 we need a random amount of cars at the top and let the remaining randomly fill up with other colored cars. //we alse need to do the same for the bottom row. We also need to check if the random amount of extra cars arent the same as the answer. if (answer <= 6) { amountTop = Random.Range(1, answer); amountBottom = answer - amountTop; int CabrioOrCars = Random.Range(0, 2); //List with spots. topSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; bottomSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; //List with all the colored cars. carColorList = new List<int> { 0, 1, 2, 3, 4, 5 }; carTopColor = Random.Range(0, carColorList.Count); Debug.Log(carTopColor); carColorList.Remove(carTopColor); carBottomColor = carColorList[Random.Range(0, carColorList.Count)]; if (CabrioOrCars == 0) { SpawnNormalCar(amountTop, amountBottom, carTopColor); } else if (CabrioOrCars == 1) { SpawnCabrio(amountTop, amountBottom, carTopColor); } int maxSpotsTop = maxSpots - amountTop; int maxSpotsBottom = maxSpots - amountBottom; int randomAmountOfBlueCarsTop = Random.Range(1, maxSpots - amountTop); int randomAmountOfBlueCarsBottom = Random.Range(1, maxSpots - amountBottom); //while the extra cars amount is the same as the answer we need the game to get a different amount of extra cars. while (randomAmountOfBlueCarsTop + randomAmountOfBlueCarsBottom == answer) { randomAmountOfBlueCarsTop = Random.Range(1, maxSpots - amountTop); randomAmountOfBlueCarsBottom = Random.Range(1, maxSpots - amountBottom); } //spawning the cars we wont be counting. if (CabrioOrCars == 0) { SpawnCabrio(randomAmountOfBlueCarsTop, randomAmountOfBlueCarsBottom, carBottomColor); } else if (CabrioOrCars == 1) { SpawnNormalCar(randomAmountOfBlueCarsTop, randomAmountOfBlueCarsBottom, carBottomColor); } } //if the answer is 7 or 8 we need a random amount of cars at the top and let the remaining randomly fill up with other colored cars. //we alse need to do the same for the bottom row. We also need to check if the random amount of extra cars arent the same as the answer. if (answer == 7 || answer == 8) { minSpots = answer - maxSpots + 1; amountTop = Random.Range(minSpots, maxSpots); amountBottom = answer - amountTop; int CabrioOrCars = Random.Range(0, 2); //List for available spots topSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; bottomSpotList = new List<int> { 0, 1, 2, 3, 4, 5 }; //List for colored cars carColorList = new List<int> { 0, 1, 2, 3, 4, 5 }; carTopColor = Random.Range(0, carColorList.Count); Debug.Log(carTopColor); carColorList.Remove(carTopColor); carBottomColor = carColorList[Random.Range(0, carColorList.Count)]; if (CabrioOrCars == 0) { SpawnNormalCar(amountTop, amountBottom, carTopColor); } else { SpawnCabrio(amountTop, amountBottom, carTopColor); } int maxSpotsTop = maxSpots - amountTop; int maxSpotsBottom = maxSpots - amountBottom; int randomAmountOfBlueCarsTop = Random.Range(1, maxSpotsTop); int randomAmountOfBlueCarsBottom = Random.Range(1, maxSpotsBottom); //while the extra cars amount is the same as the answer we need the game to get a different amount of extra cars. while (randomAmountOfBlueCarsTop + randomAmountOfBlueCarsBottom == answer) { randomAmountOfBlueCarsTop = Random.Range(1, maxSpots - amountTop); randomAmountOfBlueCarsBottom = Random.Range(1, maxSpots - amountBottom); } //spawning the cars we wont be counting. if (CabrioOrCars == 0) { SpawnCabrio(randomAmountOfBlueCarsTop, randomAmountOfBlueCarsBottom, carBottomColor); } else { SpawnNormalCar(randomAmountOfBlueCarsTop, randomAmountOfBlueCarsBottom, carBottomColor); } } } /// <summary> /// spawning the random amount of cabrio cars on the top and bottom row. /// </summary> /// <param name="amountOfCarsTop"></param> /// <param name="amountOfCarsBottom"></param> /// <param name="carsColorToCount"></param> public void SpawnCabrio(int amountOfCarsTop, int amountOfCarsBottom, int carsColorToCount) { StartCoroutine(WaitForCarSpawnTop(CabrioCars, amountOfCarsTop, carsColorToCount, 90f, topSpotList)); Debug.Log("Trying to spawn " + amountOfCarsTop + " different cars"); StartCoroutine(WaitForCarSpawnBottom(CabrioCars, amountOfCarsBottom, carsColorToCount, -90f, bottomSpotList)); Debug.Log("Trying to spawn " + amountOfCarsBottom + " different cars"); } /// <summary> /// spawning the random amount of normal cars with roof on the top and bottom row /// </summary> /// <param name="amountOfCarsTop"></param> /// <param name="amountOfCarsBottom"></param> /// <param name="carsColorToCount"></param> public void SpawnNormalCar(int amountOfCarsTop, int amountOfCarsBottom, int carsColorToCount) { StartCoroutine(WaitForCarSpawnTop(NormalCars, amountOfCarsTop, carsColorToCount, 90f, topSpotList)); Debug.Log("Trying to spawn " + amountOfCarsTop + " different cars"); StartCoroutine(WaitForCarSpawnBottom(NormalCars, amountOfCarsBottom, carsColorToCount, -90f, bottomSpotList)); Debug.Log("Trying to spawn " + amountOfCarsBottom + " different cars"); } //spawning the random amount of cars to count on the top and bottom row. public void SpawnCarsEasyNormal(int amountOfCarsTop, int amountOfCarsBottom, int carsColorToCount) { StartCoroutine(WaitForCarSpawnTop(CabrioCars, amountOfCarsTop, carsColorToCount, 90f, topSpotList)); Debug.Log("Trying to spawn " + amountOfCarsTop + " different cars"); StartCoroutine(WaitForCarSpawnBottom(CabrioCars, amountOfCarsBottom, carsColorToCount, -90f, bottomSpotList)); Debug.Log("Trying to spawn " + amountOfCarsBottom + " different cars"); } /// <summary> /// function for clearing the cars after the answer is correct. /// </summary> /// <returns></returns> public IEnumerator WaitForCarClear() { yield return new WaitForSeconds(timeToClearCars); for (int i = 0; i < VehicleSpawnerScript.VehiclesInScene.Count; i++) { yield return new WaitForSeconds(Random.Range(0f, 0.1f)); VehicleSpawnerScript.VehiclesInScene[i].Anim.SetBool("CanMoveIn", false); } } /// <summary> /// function for spawning the cars at the top row. /// </summary> /// <param name="amountOfCars">The amount of cars we want to spawn at the top row</param> /// <param name="carColor">The color the spawned cars need to be</param> /// <param name="spawnRotation">Originaly the cars face the right side of the screen, here we needs to set the front towards the parking spot</param> /// <param name="listToUse">The list with the spots we want the cars to spawn at</param> /// <returns></returns> public IEnumerator WaitForCarSpawnTop(GameObject[] vehicle, int amountOfCars, int carColor, float spawnRotation,List<int> listToUse) { yield return new WaitForSeconds(1.2f); for (int i = 0; i < amountOfCars; i++) { yield return new WaitForSeconds(Random.Range(0f, timeToSpawnCars)); int randomSpotTop = listToUse[Random.Range(0, listToUse.Count)]; if (normal == true) { int CabrioOrCar = Random.Range(0, 2); if (CabrioOrCar == 0) { VehicleSpawnerScript.SpawnVehicle(CabrioCars[Random.Range(0, carColorList.Count)], TopSpawnPoints[randomSpotTop].transform.position, spawnRotation, false, false); } else if (CabrioOrCar == 1) { VehicleSpawnerScript.SpawnVehicle(NormalCars[Random.Range(0, carColorList.Count)], TopSpawnPoints[randomSpotTop].transform.position, spawnRotation, false, false); } } else if (easy == true) { int CabrioOrCar = Random.Range(0, 2); if (CabrioOrCar == 0) { VehicleSpawnerScript.SpawnVehicle(CabrioCars[carColor], TopSpawnPoints[randomSpotTop].transform.position, spawnRotation, false, false); } else if (CabrioOrCar == 1) { VehicleSpawnerScript.SpawnVehicle(NormalCars[carColor], TopSpawnPoints[randomSpotTop].transform.position, spawnRotation, false, false); } } else if (hard == true) { VehicleSpawnerScript.SpawnVehicle(vehicle[carColor], TopSpawnPoints[randomSpotTop].transform.position, spawnRotation, false, false); } listToUse.Remove(randomSpotTop); } } /// <summary> /// function for spawning the cars at the bottom row. /// </summary> /// <param name="amountOfCars">The amount of cars we want to spawn at the bottom row</param> /// <param name="carColor">The color the spawned cars need to be</param> /// <param name="spawnRotation">Originaly the cars face the right side of the screen, here we needs to set the front towards the parking spot</param> /// <param name="listToUse">The list with the spots we want the cars to spawn at</param> /// <returns></returns> public IEnumerator WaitForCarSpawnBottom(GameObject[] vehicle, int amountOfCars, int carColor, float spawnRotation, List<int> listToUse) { yield return new WaitForSeconds(1.2f); for (int i = 0; i < amountOfCars; i++) { yield return new WaitForSeconds(Random.Range(0f, timeToSpawnCars)); int randomSpotBottom = listToUse[Random.Range(0, listToUse.Count)]; if (normal == true) { int CabrioOrCar = Random.Range(0, 2); if (CabrioOrCar == 0) { VehicleSpawnerScript.SpawnVehicle(CabrioCars[Random.Range(0, carColorList.Count)], BottomSpawnPoints[randomSpotBottom].transform.position, spawnRotation, false, false); } else if (CabrioOrCar == 1) { VehicleSpawnerScript.SpawnVehicle(NormalCars[Random.Range(0, carColorList.Count)], BottomSpawnPoints[randomSpotBottom].transform.position, spawnRotation, false, false); } } else if (easy == true) { int CabrioOrCar = Random.Range(0, 2); if (CabrioOrCar == 0) { VehicleSpawnerScript.SpawnVehicle(CabrioCars[carColor], BottomSpawnPoints[randomSpotBottom].transform.position, spawnRotation, false, false); } else if (CabrioOrCar == 1) { VehicleSpawnerScript.SpawnVehicle(NormalCars[carColor], BottomSpawnPoints[randomSpotBottom].transform.position, spawnRotation, false, false); } } else if (hard == true) { VehicleSpawnerScript.SpawnVehicle(vehicle[carColor], BottomSpawnPoints[randomSpotBottom].transform.position, spawnRotation, false, false); } listToUse.Remove(randomSpotBottom); } } /// <summary> /// Set the answer used in all the other functions /// </summary> /// <param name="answerAmount"></param> private void SetAnswer(int answerAmount) { for (int i = 0; i < EligibleBlocks.Length; i++) { if (blockQuestion.ID == EligibleBlocks[i].ID) { answer = i + answerAmount; } } } /// <summary> /// set the block that need to be used for the questions. /// </summary> /// <param name="questions"></param> /// <param name="startingAnswer"></param> private void SetBlockEligible(int questions,int startingAnswer) { blocks = new BlockData[questions]; for (int i = 0; i < questions; i++) { blocks[i] = EligibleBlocks[startingAnswer + i]; } } } }