-
Notifications
You must be signed in to change notification settings - Fork 1
/
GameManager.cs
47 lines (35 loc) · 969 Bytes
/
GameManager.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
public class GameManager : MonoBehaviour
{
// ゲームオブジェクト
Game game;
// プレイヤー名のリスト
List<string> playerNames = new List<string>();
// プレイヤー名の候補リスト
public List<string> candidate_playerName;
// 参加プレイヤー数
public int participants;
// 再戦回数
public int rematch;
// ログ出力の有無
public bool logEnable;
void Start()
{
Debug.unityLogger.logEnabled = logEnable;
for (int i = 0; i < participants; i++)
{
playerNames.Add(candidate_playerName[i]);
}
List<string> temp = new List<string>();
temp = playerNames.OrderBy(i => Guid.NewGuid()).ToList();
playerNames = temp;
game = new Game(playerNames);
}
void Update()
{
}
}