add:添加体感服功能

This commit is contained in:
bzx
2025-10-14 18:17:45 +08:00
parent 229046c6f8
commit df10c3f4da
19 changed files with 633 additions and 118 deletions

View File

@@ -127,26 +127,26 @@ public class Player : NetworkRoomPlayer,IDamagable
Vector3 directionFormHit=(transform.position-_sender.position).normalized;
float angle = Vector3.Angle(forward, directionFormHit);
int index = Random.Range(0, 4);
//TrueGearEffectManager.Ins.OnHit(angle > 90,index,false);
TrueGearEffectManager.Ins.OnHit(angle > 90,index,false);
}
#endif
if (currentHp <= 0 && IsAlive)
{
IsAlive = false;
isDie = true;
GameLocal.Ins.DieUI.SetActive(true);
GameManager.Ins.PlaySound2DRPC("1.35");
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
{
IsAlive = true;
isDie = false;
GameLocal.Ins.DieUI.SetActive(false);
currentHp = maxHp;
EventDispatcher.TriggerEvent("HpChange", currentHp, maxHp);
time = 0f;
}, 5f, this);
}
else if (currentHp > 0)
// if (currentHp <= 0 && IsAlive)
// {
// IsAlive = false;
// isDie = true;
// GameLocal.Ins.DieUI.SetActive(true);
// GameManager.Ins.PlaySound2DRPC("1.35");
// MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>
// {
// IsAlive = true;
// isDie = false;
// GameLocal.Ins.DieUI.SetActive(false);
// currentHp = maxHp;
// EventDispatcher.TriggerEvent("HpChange", currentHp, maxHp);
// time = 0f;
// }, 5f, this);
// }
if (currentHp > 0)
{
GameLocal.Ins.HitUI.SetActive(true);
MonoSingleton<CoroutineTaskManager>.Instance.WaitSecondTodo(() =>