Skip to content

Commit

Permalink
코드컨벤션적용_4
Browse files Browse the repository at this point in the history
코드컨벤션적용_4
  • Loading branch information
woojin211 committed May 30, 2024
1 parent 5a460c0 commit 3108389
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 5 additions & 2 deletions Assets/2Scripts/Lobby/LobbyManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -369,9 +369,12 @@ public void SetRoomList(List<RoomInfo> roomInfos)
aiCount++;

// 방 리스트에서 방 찾아서 활성화
if ((bool)properties["isTeamMode"] == true) {
if ((bool)properties["isTeamMode"] == true)
{
roomList[roomInfos.IndexOf(room)].transform.GetChild(0).GetComponent<Image>().color = new Color(.8f, .4f, .8f);
} else {
}
else
{
roomList[roomInfos.IndexOf(room)].transform.GetChild(0).GetComponent<Image>().color = new Color(.7f, .7f, .7f);
}
roomList[roomInfos.IndexOf(room)].Active(room.Name, room.PlayerCount + aiCount);
Expand Down
6 changes: 2 additions & 4 deletions Assets/2Scripts/NetworkManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,8 @@ public void CreateRoom(string roomName)
var roomOptions = new RoomOptions
{
CustomRoomPropertiesForLobby = new[] {IsStarted, IsTeamMode, "GameMode", Slot0, Slot1, Slot2, Slot3, Slot4, Slot5, Slot6, Slot7, "team"+Slot1, "team"+Slot2, "team"+Slot3, "team"+Slot4, "team"+Slot5, "team"+Slot6, "team"+Slot7,"name"+Slot1, "name"+Slot2, "name"+Slot3, "name"+Slot4, "name"+Slot5, "name"+Slot6, "name"+Slot7},
CustomRoomProperties = new Hashtable {
CustomRoomProperties = new Hashtable
{
{IsStarted, false}, {IsTeamMode, LobbyManager.IT.isTeamMode}, {"GameMode", 1},
{Slot0, 1}, {Slot1, -1}, {Slot2, -1}, {Slot3, -1}, {Slot4, -1}, {Slot5, -1}, {Slot6, -1}, {Slot7, -1},
{"team"+Slot0, LobbyManager.IT.roomPlayerSlots[0].teamNumber}, {"team"+Slot1, 0}, {"team"+Slot2, 0}, {"team"+Slot3, 0}, {"team"+Slot4, 0}, {"team"+Slot5, 0}, {"team"+Slot6, 0}, {"team"+Slot7, 0},
Expand Down Expand Up @@ -329,7 +330,6 @@ public void SetSlotToAI(int slotNumber)
var slot = LobbyManager.IT.roomPlayerSlots[slotNumber];
LobbyManager.IT.SetSlotAI(slotNumber); // 슬롯
// slot.actorNumber = 99; // AI 번호인 99로 설정


if (LobbyManager.IT.isTeamMode == true)
SetSlotPp(slot.slotName, 99, "AI_"+slotNumber, 1); // 슬롯 설정
Expand Down Expand Up @@ -362,8 +362,6 @@ public void SetChangeTeam() {
var slot = LobbyManager.IT.roomPlayerSlots.Find(a => a.actorNumber == player.ActorNumber); // 슬롯
var cProperties = PhotonNetwork.CurrentRoom.CustomProperties;

// Debug.Log(player);
// Debug.Log(slot);
// Debug.Log(LobbyManager.IT.roomPlayerSlots[0].actorNumber);
Debug.Log("Change Team To " + (int)cProperties["team"+slot.slotName] + ", Slot: " + slot.slotName);
if ((int)cProperties["team"+slot.slotName] == 1)
Expand Down

0 comments on commit 3108389

Please sign in to comment.