This commit is contained in:
RochesterX
2025-03-28 13:00:37 -04:00
parent 4c22943273
commit 451bf78249
13 changed files with 1767 additions and 1287 deletions

View File

@@ -6,6 +6,7 @@ public class UseItem : MonoBehaviour
private GameObject heldItem;
private bool isHoldingItem = false;
private float holdStartTime;
public float holdTime;
void Update()
{
@@ -14,7 +15,7 @@ public class UseItem : MonoBehaviour
heldItem.transform.position = transform.position + Vector3.up;
if (GameManager.gameMode == GameManager.GameMode.keepAway)
{
float holdTime = Time.time - holdStartTime;
holdTime += Time.deltaTime;
GameManager.Instance.UpdatePlayerHoldTime(gameObject, holdTime);
}
}