コード例 #1
0
ファイル: PlayerManager.cs プロジェクト: tanis2000/Futile
        void AddPlayer(InputDevice device)
        {
            if (players.Count >= Config.MAX_PLAYERS)
                return;

            Player player = new Player ();
            player.team = Team_None;
            player.device = device;
            player.color = availableColors.Shift ();

            players.Add (player);

            player.HandleAdded ();

            if (OnPlayerAdded != null)
                OnPlayerAdded (player);
        }