From 1629033466fd6a17fb07d0794a2e648ddd8e6c71 Mon Sep 17 00:00:00 2001 From: Yuya Sumie Date: Tue, 13 Jul 2021 12:35:21 +0900 Subject: [PATCH] =?UTF-8?q?=E4=B8=80=E8=88=AC=E5=90=91=E3=81=91=E3=81=AE?= =?UTF-8?q?=E3=81=8A=E9=A1=8C=E3=82=92=E8=BF=BD=E5=8A=A0=E3=81=97=E3=81=9F?= =?UTF-8?q?=E3=81=8B=E3=82=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../04_CreateRoom/ConfirmCreateRoomButton.cs | 22 ++++++------------- 1 file changed, 7 insertions(+), 15 deletions(-) diff --git a/Assets/Scripts/04_CreateRoom/ConfirmCreateRoomButton.cs b/Assets/Scripts/04_CreateRoom/ConfirmCreateRoomButton.cs index a0fa841..1444d16 100644 --- a/Assets/Scripts/04_CreateRoom/ConfirmCreateRoomButton.cs +++ b/Assets/Scripts/04_CreateRoom/ConfirmCreateRoomButton.cs @@ -1,5 +1,6 @@ using System; using System.IO; +using System.Linq; using System.Collections; using System.Collections.Generic; using UnityEngine; @@ -85,33 +86,24 @@ private IEnumerator PostRequestAsync() private int[] RandomThemeIDs(int categoryID) { - int start = 0; - int end = 0; + List numbers = new List(); + switch (categoryID) { - case 0: // おまかせ - start = 1; - end = 40; + case 0: // 一般向け + numbers = (Enumerable.Range(1, 40).Concat(Enumerable.Range(121, 40))).ToList(); break; case 1: // エンジニア - start = 41; - end = 80; + numbers = Enumerable.Range(41, 40).ToList(); break; case 2: // 18禁 - start = 81; - end = 120; + numbers = Enumerable.Range(81, 40).ToList(); break; } int count = 3; int[] ids = new int[count]; - List numbers = new List(); - - for (int i = start; i <= end; i++) - { - numbers.Add(i); - } UnityEngine.Random.InitState(System.DateTime.Now.Millisecond); for (int i = 0; i < count; i++) {