From 14338f752fbea325b224531d459eabe9025b014d Mon Sep 17 00:00:00 2001 From: dal4segno Date: Thu, 12 Mar 2026 01:29:02 +0900 Subject: [PATCH] =?UTF-8?q?[Team]=20=ED=8C=80=20=ED=83=80=EC=9E=85?= =?UTF-8?q?=EC=9D=84=20enum=EC=9C=BC=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 기존 int teamId를 TeamType enum으로 변경하여 가독성과 타입 안전성 향상 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- Assets/Scripts/Team.cs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/Assets/Scripts/Team.cs b/Assets/Scripts/Team.cs index af783240..f6ee9af8 100644 --- a/Assets/Scripts/Team.cs +++ b/Assets/Scripts/Team.cs @@ -2,15 +2,26 @@ using UnityEngine; namespace Colosseum { + /// + /// 팀 타입 열거형 + /// + public enum TeamType + { + None = 0, + Player = 1, + Enemy = 2, + Neutral = 3, + } + /// /// 팀 정보를 관리하는 컴포넌트. /// 캐릭터나 엔티티에 추가하여 팀 구분에 사용합니다. /// public class Team : MonoBehaviour { - [SerializeField] private int teamId = 0; + [SerializeField] private TeamType teamType = TeamType.None; - public int TeamId => teamId; + public TeamType TeamType => teamType; /// /// 같은 팀인지 확인 @@ -27,7 +38,7 @@ namespace Colosseum // 한쪽만 팀이 없으면 다른 팀 if (teamA == null || teamB == null) return false; - return teamA.TeamId == teamB.TeamId; + return teamA.TeamType == teamB.TeamType; } } }