2026.06.25 Fishing scene

This commit is contained in:
2026-06-25 17:39:42 +09:00
parent 3a3b3dcb41
commit e8f67c0609
44 changed files with 4061 additions and 133 deletions

View File

@@ -0,0 +1,37 @@
using UnityEngine;
/// <summary>
/// 낚싯대를 잡고 있는지 기록하는 간단한 상태 스크립트입니다.
/// FishingRod 오브젝트에 붙이고, XR Grab Interactable의 Select Entered/Exited 이벤트에 연결하세요.
/// </summary>
public class FishingRodState : MonoBehaviour
{
[Header("State")]
[SerializeField] private bool isHeld;
[Header("Debug")]
[SerializeField] private bool showDebugLog = true;
public bool IsHeld => isHeld;
public void MarkHeld()
{
SetHeld(true);
}
public void MarkReleased()
{
SetHeld(false);
}
public void SetHeld(bool value)
{
if (isHeld == value)
return;
isHeld = value;
if (showDebugLog)
Debug.Log(isHeld ? "낚싯대 잡음" : "낚싯대 놓음");
}
}