chunk 1: core gameplay scripts scenes runtime assets
This commit is contained in:
31
Assets/Scripts/SpecialMoveCardSystem/DebugPocketPrinter.cs
Normal file
31
Assets/Scripts/SpecialMoveCardSystem/DebugPocketPrinter.cs
Normal file
@@ -0,0 +1,31 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace SpecialMoveCards
|
||||
{
|
||||
/// <summary>Optional helper to log pocket contents for debugging.</summary>
|
||||
public class DebugPocketPrinter : MonoBehaviour
|
||||
{
|
||||
public PlayerPocket pocket;
|
||||
public float printEverySeconds = 5f;
|
||||
private float t;
|
||||
|
||||
private void Reset()
|
||||
{
|
||||
pocket = GetComponent<PlayerPocket>();
|
||||
}
|
||||
|
||||
private void Update()
|
||||
{
|
||||
t += Time.deltaTime;
|
||||
if (t >= printEverySeconds)
|
||||
{
|
||||
t = 0f;
|
||||
if (pocket == null) return;
|
||||
var snap = pocket.GetSnapshot();
|
||||
string a = snap[0] ? snap[0].moveName : "-";
|
||||
string b = snap[1] ? snap[1].moveName : "-";
|
||||
Debug.Log($"[Pocket] Slot1={a}, Slot2={b}, Count={pocket.Count}");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user