Compare commits

...

14 Commits

Author SHA1 Message Date
99jamin
2a8e92aa59 Merge branch 'main' into DEG-143-세이브-강화-병합 2025-05-13 21:29:02 +09:00
77c798f9ad Merge pull request 'DEG-62 몬스터 폴리싱' (!48) from DEG-62 into main
Reviewed-on: #48
Reviewed-by: Sehyeon <sehyeon1837@gmail.com>
Reviewed-by: Lim0_C <dladudcks22@gmail.com>
2025-05-13 08:18:33 +00:00
Sehyeon
55533e6571 git conflict resolve 2025-05-13 17:11:13 +09:00
ae7a08a205 Merge pull request 'DEG-161 [Fix] 충돌 영역과 말풍선 위치 조정' (!49) from DEG-161-충돌-영역-및-UI-위치-조정 into main
Reviewed-on: #49
Reviewed-by: jay <ayjindev@gmail.com>
Reviewed-by: Lim0_C <dladudcks22@gmail.com>
2025-05-13 07:42:35 +00:00
00fee9d6a2 [fix] 피격 범위 개선
- 레이 캐스트에서 구형 캐스트로 변경함

DEG-62
2025-05-13 16:40:04 +09:00
Sehyeon
6f3685fc8a DEG-161 [Fix] 충돌 영역과 말풍선 위치 조정 2025-05-13 16:23:37 +09:00
HaeinLEE
2e1b96baf0 [Fix] 지난 작업 내역 공용 프리팹에 업데이트 2025-05-13 16:12:22 +09:00
0a2c2a6cb8 Merge pull request 'DEG-158 [Fix] 컷씬 애니메이션 기움 현상 고침' (!45) from DEG-158-컷씬-애니메이션-기움-현상-수정 into main
Reviewed-on: #45
Reviewed-by: jay <ayjindev@gmail.com>
Reviewed-by: Sehyeon <sehyeon1837@gmail.com>
2025-05-13 06:19:38 +00:00
Sehyeon
5b6414274d DEG-152 [Feat] 행동 체크와 말풍선 수정 2025-05-13 15:04:37 +09:00
Lim0_C
bf17dfd164 DEG-158 [Fix] 컷씬 애니메이션 기움 현상 고침 2025-05-13 15:03:31 +09:00
396f625ac8 [fix] 마법사 매직미사일 발사 위치 조정
- 하단으로 조정하여 플레이어 머리 위로 날아가지 않도록 조정

DEG-62
2025-05-13 13:44:50 +09:00
0efe56ad42 [fix] 장판 마법 캐스팅 애니메이션 타이밍 조정
DEG-62
2025-05-13 13:36:50 +09:00
fa1bf29ae8 [fix] 마법사 스펠 애니메이션, SFX 타이밍 조정 2025-05-13 11:15:10 +09:00
Sehyeon
d74872d7a1 DEG-152 [Feat] 소품 충돌처리 2025-05-13 10:26:41 +09:00
27 changed files with 515 additions and 223 deletions

BIN
Assets/JYY/Prefabs/Alien Big Blink.prefab (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

BIN
Assets/JYY/Scenes/MonsterTest.unity (Stored with Git LFS)

Binary file not shown.

View File

@ -9,6 +9,7 @@ public class DungeonPanelController : MonoBehaviour
[SerializeField] private Slider _bossHealthBar; // 0~1 value
[SerializeField] private Image[] _playerHealthImages; // color 값 white / black 로 조정
private int _countHealth = 0;
private int visibleHeartCount = 3; // 강화 레벨로 설정됨

BIN
Assets/KSH/GameManager.prefab (Stored with Git LFS)

Binary file not shown.

View File

@ -41,14 +41,19 @@ public class PlayerStats : MonoBehaviour, ISaveable
// 결근 이벤트 관련 변수
private bool _hasWorkedToday = false;
public bool HasWorkedToday => _hasWorkedToday;
private bool _hasCheckedAbsenceToday = false; // 결근 체크, 하루에 결근 여러 번 체크 안하기 위함
public event Action OnAbsent; // 결근
// 말풍선
private GameObject messagePanelInstance;
private SpeechBubbleFollower speechBubbleFollower;
private bool isActiveBubble;
private bool hasShownBubbleToday; // 하루에 말풍선 하나만 표시하기
private GameObject _messagePanelInstance;
private SpeechBubbleFollower _speechBubbleFollower;
private bool _isActiveBubble;
private bool _hasShownBubbleToday; // 하루에 말풍선 하나만 표시하기
private int _mealCount;
public int MealCount => _mealCount;
private const int MAX_MEAL_COUNT = 2; // 하루 2회 제한
private void Awake()
{
@ -77,6 +82,7 @@ public class PlayerStats : MonoBehaviour, ISaveable
CheckBubble();
SceneManager.sceneLoaded += OnSceneLoaded; // 씬 전환 이벤트
_mealCount = 0; // 식사 횟수 0회
}
#region (Bubble)
@ -96,10 +102,10 @@ public class PlayerStats : MonoBehaviour, ISaveable
private void LoadMessagePanel()
{
if (messagePanelInstance != null) // 기존 패널 파괴
if (_messagePanelInstance != null) // 기존 패널 파괴
{
Destroy(messagePanelInstance);
messagePanelInstance = null;
Destroy(_messagePanelInstance);
_messagePanelInstance = null;
}
GameObject messagePanelPrefab = Resources.Load<GameObject>("Prefabs/MessagePanel");
@ -108,49 +114,57 @@ public class PlayerStats : MonoBehaviour, ISaveable
{
Canvas canvas = FindObjectOfType<Canvas>();
messagePanelInstance = Instantiate(messagePanelPrefab, canvas.transform);
speechBubbleFollower = messagePanelInstance.GetComponent<SpeechBubbleFollower>();
speechBubbleFollower.SetPlayerTransform();
_messagePanelInstance = Instantiate(messagePanelPrefab, canvas.transform);
_speechBubbleFollower = _messagePanelInstance.GetComponent<SpeechBubbleFollower>();
_speechBubbleFollower.SetPlayerTransform();
if (speechBubbleFollower != null)
if (_speechBubbleFollower != null)
{
isActiveBubble = false;
hasShownBubbleToday = false;
speechBubbleFollower.HideMessage();
_isActiveBubble = false;
_hasShownBubbleToday = false;
_speechBubbleFollower.HideMessage();
}
}
}
private void CheckBubble()
{
if (isActiveBubble)
if (_isActiveBubble)
{
isActiveBubble = false;
_isActiveBubble = false;
HideBubble();
}
if (TimeStat >= 8.0f && TimeStat < 9.0f && !isActiveBubble && !hasShownBubbleToday)
if (TimeStat >= 8.0f && TimeStat < 9.0f && !_isActiveBubble && !_hasShownBubbleToday)
{
hasShownBubbleToday = true;
isActiveBubble = true;
_hasShownBubbleToday = true;
_isActiveBubble = true;
ShowBubble();
}
}
private InteractionAnimationPanelController _interactionAnimation;
public void SetInteractionPanelController(InteractionAnimationPanelController panelController)
{
_interactionAnimation = panelController;
}
public void ShowBubble()
{
if(isActiveBubble)
speechBubbleFollower.ShowMessage();
if (_interactionAnimation.IsPanelActive()) return;
if(_isActiveBubble)
_speechBubbleFollower.ShowMessage();
}
public void HideBubble()
{
speechBubbleFollower.HideMessage();
_speechBubbleFollower.HideMessage();
}
public void ShowAndHideBubble(string text)
{
speechBubbleFollower.ShowAndHide(text);
_speechBubbleFollower.ShowAndHide(text);
}
#endregion
@ -172,13 +186,17 @@ public class PlayerStats : MonoBehaviour, ISaveable
// 9시가 지났는데 출근하지 않은 경우
if (TimeStat >= 9.0f && !_hasWorkedToday)
{
_hasCheckedAbsenceToday = true; // 결근 체크 완료 표시
OnAbsent?.Invoke();
PerformAction(ActionType.Absence); // 평판 -3
Debug.Log("결근 처리: 평판 감소" + ReputationStat);
PerformAbsent();
}
}
public void PerformAbsent() // 강제 결근 이벤트
{
_hasCheckedAbsenceToday = true; // 결근 체크 완료 표시
OnAbsent?.Invoke();
PerformAction(ActionType.Absence); // 평판 -3
}
// 행동 처리 메서드
public void PerformAction(ActionType actionType)
@ -200,6 +218,16 @@ public class PlayerStats : MonoBehaviour, ISaveable
_hasWorkedToday = true;
OnWorked?.Invoke();
}
if (actionType == ActionType.Eat)
{
_mealCount++;
}
}
public bool CanEat()
{
return _mealCount < MAX_MEAL_COUNT; // 식사 횟수 0,1 일 때만 true
}
// 출근 가능 여부 확인 메서드
@ -271,7 +299,10 @@ public class PlayerStats : MonoBehaviour, ISaveable
// 결근 관련 변수 초기화
_hasWorkedToday = false;
_hasCheckedAbsenceToday = false;
hasShownBubbleToday = false;
_hasShownBubbleToday = false;
// 식사 횟수 초기화
_mealCount = 0;
OnDayEnded?.Invoke();
}
@ -302,7 +333,7 @@ public class PlayerStats : MonoBehaviour, ISaveable
{
EndDay(time, actionType);
}
CheckBubble();
}

BIN
Assets/KSH/ReHousing.unity (Stored with Git LFS)

Binary file not shown.

View File

@ -8,7 +8,7 @@ public class SpeechBubbleFollower : MonoBehaviour
[SerializeField] private Transform playerTransform;
[SerializeField] private TMP_Text bubbleText;
private Vector3 offset = new Vector3(200f, 250f, 0);
private Vector3 offset = new Vector3(150f, 200f, 0);
private Camera mainCamera;
private RectTransform rectTransform;

BIN
Assets/LIN/Prefabs/Canvas.prefab (Stored with Git LFS)

Binary file not shown.

BIN
Assets/LIN/Prefabs/SuddenEventPanel.prefab (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: d5664f5a156d8a0449b8b9a6deebd122
guid: 794d47980d56ee84f99de7726586558f
PrefabImporter:
externalObjects: {}
userData:

BIN
Assets/LIN/Prefabs/SuddenPanelImages.prefab (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: f35de5ac1a0aecd43984efd8b24054e5
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

BIN
Assets/LIN/ReHousing Loding Anim.unity (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 84aaded28076685429f8940810bde779
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -12,14 +12,14 @@ public class InteractionController : MonoBehaviour
[Header("UI 연동")]
[SerializeField] private HousingCanvasController housingCanvasController;
[SerializeField] private InteractionAnimationPanelController interactionAnimationPanelController;
private void Start()
{
PlayerStats.Instance.OnWorked += SuddenAfterWorkEventHappen;
PlayerStats.Instance.SetInteractionPanelController(interactionAnimationPanelController);
}
// 상호작용 가능한 사물 범위에 들어올 때
private void OnTriggerEnter(Collider other)
{
@ -72,6 +72,12 @@ public class InteractionController : MonoBehaviour
return;
}
}
if (interactionType == ActionType.Eat && !PlayerStats.Instance.CanEat()) // 식사 횟수 제한 체크
{
PlayerStats.Instance.ShowAndHideBubble("배불러서 못 먹어");
return;
}
if (interactionType == ActionType.Dungeon)
{
@ -117,6 +123,20 @@ public class InteractionController : MonoBehaviour
housingCanvasController.ShowSuddenEventPanel(suddenEventText, () =>
{
if (afterWorkEventType == AfterWorkEventType.OvertimeWork)
{
if (!PlayerStats.Instance.CanPerformByHealth(ActionType.OvertimeWork))
{
PlayerStats.Instance.ShowAndHideBubble("체력이 없어...");
return;
}
PlayerStats.Instance.PerformAction(ActionType.OvertimeWork);
}
else
{
PlayerStats.Instance.PerformAction(ActionType.TeamDinner);
}
housingCanvasController.ShowSuddenEventImage(afterWorkEventType);
GameManager.Instance.PlaySuddenEventSound(afterWorkEventType);
});

View File

@ -17,15 +17,27 @@ public class InteractionAnimationPanelController : MonoBehaviour
private Coroutine _textAnimCoroutine;
private Coroutine _autoHideCoroutine;
private Canvas _parentCanvas;
private bool _isAbsenceToday = false;
public void SetDoingText(string text)
{
doingText.text = text;
}
public bool IsPanelActive()
{
return panel.activeSelf;
}
public void ShowAnimationPanel(ActionType actionType, string animationText)
{
PlayerStats.Instance.HideBubble();
if (actionType == ActionType.Sleep && !PlayerStats.Instance.HasWorkedToday) // 결근
{
_isAbsenceToday = true;
}
// 1) 패널 활성화
panel.SetActive(true);
@ -88,6 +100,8 @@ public class InteractionAnimationPanelController : MonoBehaviour
}
yield return null;
}
//로테이션 초기화
doingImage.rectTransform.localRotation = Quaternion.identity;
GameManager.Instance.StopInteractionSound(actionType);
//패널 닫고 애니메이션 null처리
@ -110,6 +124,12 @@ public class InteractionAnimationPanelController : MonoBehaviour
StopCoroutine(_autoHideCoroutine);
_autoHideCoroutine = null;
}
if (_isAbsenceToday) // 결근한 경우
{
PlayerStats.Instance.PerformAbsent();
return;
}
// 패널 닫히고 결근 체크, 상호작용 패널과 결근 엔딩 채팅창이 겹치지 않기 위함
PlayerStats.Instance.CheckAbsent();

File diff suppressed because one or more lines are too long

BIN
Assets/Prefabs/ReHousing/Canvas.prefab (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

View File

@ -7,7 +7,7 @@ public abstract class CharacterBase : MonoBehaviour
{
[Header("기본 능력치")]
public string characterName; // 이름
public int maxHP = 100; // 최대 체력
private int maxHP = 300; // 최대 체력
public int currentHP; // 현재 체력
public float attackPower = 10f; // 공격력
public float defensePower = 5f; // 방어력

View File

@ -51,9 +51,15 @@ public class BulletBase : MonoBehaviour
float moveDist = _speed * Time.deltaTime;
// 1) Raycast 충돌 검사
if (Physics.Raycast(_prevPosition, _direction, out RaycastHit hit, moveDist, _targetLayer))
if (Physics.SphereCast(
_prevPosition,
1,
_direction,
out RaycastHit hit,
moveDist,
_targetLayer
))
{
// 닿은 지점으로 이동
transform.position = hit.point;
OnBulletHit(hit);
return;
@ -85,4 +91,11 @@ public class BulletBase : MonoBehaviour
Debug.Log("## Bullet destroyed");
Destroy(gameObject);
}
// 기즈모로 반지름 시각화
private void OnDrawGizmosSelected()
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(transform.position, 1);
}
}

View File

@ -277,30 +277,29 @@ public class CasterDemonController : EnemyController
private IEnumerator SlowFieldSpell()
{
var aimPosition = TargetPosOracle(out var basePos, out var rb);
// 1. 시전 애니메이션
transform.LookAt(aimPosition);
SetAnimation(Cast);
SFXPlayer(slowFieldSound);
// 2. 장판 생성과 세팅
transform.LookAt(aimPosition);
// 장판 생성과 세팅
var fixedPos = new Vector3(aimPosition.x, aimPosition.y, aimPosition.z);
var warning = Instantiate(chariotWarning, fixedPos, Quaternion.identity).GetComponent<MagicAoEField>();
warning.SetEffect(SlowFieldEffectData, null, null);
warning.SetEffect(SlowFieldEffectData, () =>
{
SetAnimation(Cast);
SFXPlayer(slowFieldSound);
}, null);
// 3. 짧은 텀 후 끝내기
// 짧은 텀 후 끝내기
yield return Wait.For(1f);
}
private IEnumerator KnockbackSpell()
{
// 시전 애니메이션
SetAnimation(Spin);
SFXPlayer(spinSound);
// 넉백 발생
var knockback = Instantiate(chariotWarning, transform).GetComponent<MagicAoEField>();
knockback.SetEffect(KnockbackData, null, null, DebuffType.Knockback.ToString());
knockback.SetEffect(KnockbackData, ()=>{
SetAnimation(Spin);
SFXPlayer(spinSound);}, null, DebuffType.Knockback.ToString());
yield return Wait.For(1f);
}