ボスに着手
This commit is contained in:
@@ -42,7 +42,7 @@ public class VRInputPunch : MonoBehaviour
|
||||
void Start()
|
||||
{
|
||||
Rigidbody rb = GetComponent<Rigidbody>();
|
||||
rb.isKinematic = true;
|
||||
rb.isKinematic = true;
|
||||
rb.useGravity = false;
|
||||
GetComponent<Collider>().isTrigger = true;
|
||||
}
|
||||
@@ -70,11 +70,17 @@ public class VRInputPunch : MonoBehaviour
|
||||
|
||||
// パリィ成功用の強力な振動をプレイヤーに返す
|
||||
TriggerHaptics(parryHapticAmplitude, parryHapticDuration);
|
||||
|
||||
|
||||
Debug.Log($"🛡️ 【ジャストパリィ成功!】 敵の体勢を崩しました。スタン時間: {parryStunDuration}秒");
|
||||
return; // パリィが成立した場合は以降のパンチ処理は行わない
|
||||
}
|
||||
}
|
||||
BossController boss = other.GetComponentInParent<BossController>();
|
||||
if (boss != null)
|
||||
{
|
||||
// ボスにパリィ成立を通知(噛みつき・突進中であれば自動でスタンへ移行)
|
||||
boss.TriggerParryStun();
|
||||
}
|
||||
else
|
||||
{
|
||||
Debug.Log("🧱 ガード(または速度不足):敵の攻撃は防いだが、弾き返せなかった。");
|
||||
@@ -100,27 +106,27 @@ public class VRInputPunch : MonoBehaviour
|
||||
info.amount = (speed * damageMultiplier) * 2f;
|
||||
info.isPoseBonus = true;
|
||||
|
||||
if(PlayerStatusManager.Instance != null) PlayerStatusManager.Instance.AddGauge(20f);
|
||||
if (PlayerStatusManager.Instance != null) PlayerStatusManager.Instance.AddGauge(20f);
|
||||
}
|
||||
else
|
||||
{
|
||||
info.amount = speed * damageMultiplier;
|
||||
info.isPoseBonus = false;
|
||||
|
||||
if(PlayerStatusManager.Instance != null) PlayerStatusManager.Instance.AddGauge(10f);
|
||||
if (PlayerStatusManager.Instance != null) PlayerStatusManager.Instance.AddGauge(10f);
|
||||
}
|
||||
info.hitPosition = other.transform.position;
|
||||
info.punchDirection = velocity.normalized;
|
||||
info.punchDirection = velocity.normalized;
|
||||
|
||||
if(PlayerStatusManager.Instance != null)
|
||||
if (PlayerStatusManager.Instance != null)
|
||||
{
|
||||
info.amount *= PlayerStatusManager.Instance.CurrentAttackMultiplier;
|
||||
}
|
||||
|
||||
|
||||
damageble.TakeDamage(info);
|
||||
|
||||
|
||||
Debug.Log($"パンチ成功 ダメージ: {info.amount:F1}");
|
||||
|
||||
|
||||
// 通常ヒットの振動を発生
|
||||
TriggerHaptics(hapticAmplitude, hapticDuration);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user