feat: 무기 특성(WeaponTrait) 시스템 및 보조손 장착 구현
- WeaponTrait enum 추가 (Melee/TwoHanded/Defense/Magic/Ranged) - SkillData에 allowedWeaponTraits 필드 및 MatchesWeaponTrait() 검증 메서드 추가 - WeaponEquipment에 보조손(오프핸드) 슬롯 지원 (장착/해제/스탯 보너스/네트워크 동기화) - EquippedWeaponTraits 프로퍼티로 메인+보조 무기 특성 합산 제공 - PlayerSkillInput 4곳(OnSkillInput/RPC/CanUseSkill/DebugExecute)에 무기 trait 제약 검증 추가 - SkillSlotUI에 무기 불호환 시 회색 표시(weaponIncompatibleColor) 지원 - 기존 검 에셋에 weaponTrait=Melee 설정
This commit is contained in:
@@ -20,6 +20,7 @@ namespace Colosseum.UI
|
||||
[SerializeField] private Color availableColor = Color.white;
|
||||
[SerializeField] private Color cooldownColor = new Color(0.2f, 0.2f, 0.2f, 0.9f);
|
||||
[SerializeField] private Color noManaColor = new Color(0.5f, 0.2f, 0.2f, 0.8f);
|
||||
[SerializeField] private Color weaponIncompatibleColor = new Color(0.3f, 0.3f, 0.3f, 0.8f);
|
||||
|
||||
private SkillData skill;
|
||||
private int slotIndex;
|
||||
@@ -88,7 +89,7 @@ namespace Colosseum.UI
|
||||
}
|
||||
}
|
||||
|
||||
public void UpdateState(float cooldownRemaining, float cooldownTotal, bool hasEnoughMana)
|
||||
public void UpdateState(float cooldownRemaining, float cooldownTotal, bool hasEnoughMana, bool isWeaponIncompatible = false)
|
||||
{
|
||||
if (skill == null)
|
||||
{
|
||||
@@ -133,7 +134,8 @@ namespace Colosseum.UI
|
||||
// 쿨다운 완료
|
||||
if (useIconForCooldown && iconImage != null)
|
||||
{
|
||||
iconImage.color = hasEnoughMana ? availableColor : noManaColor;
|
||||
iconImage.color = isWeaponIncompatible ? weaponIncompatibleColor
|
||||
: hasEnoughMana ? availableColor : noManaColor;
|
||||
}
|
||||
else if (cooldownOverlay != null)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user