convert game playing..

This commit is contained in:
2026-09-23 12:53:52 +09:00
parent 37c7942b71
commit 5d11288a6f
136 changed files with 15856 additions and 299 deletions
+43 -1
View File
@@ -2,6 +2,7 @@ using System;
using BumpCombat.Combat;
using BumpCombat.Core;
using BumpCombat.Constants;
using BumpCombat.Defense;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.LowLevel;
@@ -235,8 +236,29 @@ namespace BumpCombat.Player
if (CurrentHealth <= 0f)
{
float deathAnimationDuration = playerController.PlayDeathAnimation();
OnDied?.Invoke();
RunManager.Instance?.EndRun();
RunManager runManager = RunManager.Instance;
if (runManager != null
&& runManager.IsDefensePrototypeRun
&& DefensePrototypeController.Instance != null
&& DefensePrototypeController.Instance.HandlePlayerDied())
{
return true;
}
if (runManager == null)
{
return true;
}
if (deathAnimationDuration > 0f)
{
runManager.BeginGameOverPresentation(deathAnimationDuration);
}
else
{
runManager.EndRun();
}
}
return true;
@@ -247,6 +269,26 @@ namespace BumpCombat.Player
return value >= 0f ? value : configuredValue;
}
public bool ReviveForDefense(float invulnerabilitySeconds)
{
if (CurrentHealth > 0f)
{
return false;
}
CurrentHealth = MaxHealth;
invulnerableUntil = Time.time + Mathf.Max(0f, invulnerabilitySeconds);
hurtMovementLockedUntil = 0f;
guardUntil = 0f;
guardCooldownUntil = 0f;
activeGuardHasBlockedAttack = false;
playerController.SetTransitionLocked(false);
animator.Rebind();
animator.Update(0f);
OnHealthChanged?.Invoke(CurrentHealth, MaxHealth);
return true;
}
public void Heal(float amount)
{
if (amount <= 0f || CurrentHealth <= 0f)