void MediumRotaion(RotationMedium medium) { switch (medium) { case RotationMedium.StopAndGo: print("Stop and Go ==> " + rotationSpeed[5] + " secs"); StartCoroutine(coSlowInSlowOut(rotationSpeed[5], 0, false, false)); break; case RotationMedium.StopAndReverse: print("Stop and Reverse ==> " + rotationSpeed[6] + " secs"); StartCoroutine(coSlowInSlowOut(rotationSpeed[6], 0, false, true)); break; case RotationMedium.Rotate_180_Reverse: print("180 Forward 360 Reverse ==> " + rotationSpeed[7] + " secs"); StartCoroutine(coReverseAtAngle(rotationSpeed[7], forwardBackwardAngles[7].x, forwardBackwardAngles[7].y, (int)forwardBackwardAngles[7].z, false, false)); break; case RotationMedium.Rotate_180_StopAndGo: print("180 Stop And Go ==> " + rotationSpeed[8] + " secs"); StartCoroutine(coReverseAtAngle(rotationSpeed[8], forwardBackwardAngles[8].x, forwardBackwardAngles[8].y, (int)forwardBackwardAngles[8].z, false, true)); break; case RotationMedium.Rotate_90_Reverse_180_SlowInSlowOut: print("180 Forward 360 Reverse Slow In Slow Out ==> " + rotationSpeed[9] + " secs"); StartCoroutine(coReverseAtAngle(rotationSpeed[9], forwardBackwardAngles[9].x, forwardBackwardAngles[9].y, (int)forwardBackwardAngles[9].z, true, false)); break; default: break; } }
void SetRotationOfBoard(Difficulty difficulty) { switch (difficulty) { case Difficulty.Easy: RotationEasy rotationE = (RotationEasy)Random.Range(0, (int)RotationEasy.Max); EasyRotation(rotationE); break; case Difficulty.EasyMedium: RotationEasyMedium rotationEM = (RotationEasyMedium)Random.Range(0, (int)RotationEasyMedium.Max); EasyMediumRotation(rotationEM); break; case Difficulty.Medium: RotationMedium rotationM = (RotationMedium)Random.Range(0, (int)RotationMedium.Max); MediumRotaion(rotationM); break; case Difficulty.MediumHard: RotationMediumHard rotationMH = (RotationMediumHard)Random.Range(0, (int)RotationMediumHard.Max); MediumHardRotation(rotationMH); break; case Difficulty.Hard: RotationHard rotationH = (RotationHard)Random.Range(0, (int)RotationHard.Max); HardRotation(rotationH); break; case Difficulty.EasyHard: RotationEasyHard rotationEH = (RotationEasyHard)Random.Range(0, (int)RotationEasyHard.Max); EasyHardRotation(rotationEH); break; case Difficulty.Bonus: //Test easy rotTION RotationEasy rotationB = (RotationEasy)Random.Range(0, (int)RotationEasy.Max); EasyRotation(rotationB); break; default: break; } }