something is no yes

This commit is contained in:
2025-08-31 20:47:08 +02:00
parent fb1c3f8290
commit 224d55aec6
44 changed files with 11265 additions and 128 deletions

View File

@@ -0,0 +1,28 @@
using RebootKit.Engine.Main;
using RebootKit.Engine.Simulation;
using Unity.Mathematics;
using UnityEngine;
using UnityEngine.Assertions;
namespace RebootReality.jelycho.Enemies {
public class ZombieHurtbox : MonoBehaviour, IHurtbox {
public ZombieActor owner;
[SerializeField] ZombieBodyPartType m_BodyPart = ZombieBodyPartType.Body;
void Awake() {
Assert.IsNotNull(owner);
}
public void ReceiveDamage(Actor attacker, ulong damage, float3 worldHitPos) {
if (!owner.HasBodyPart(m_BodyPart)) {
return;
}
owner.ReceiveDamage(damage, m_BodyPart);
if (RR.World.Context is WorldContext worldContext) {
worldContext.FeedbacksManager.SpawnBloodSplash(worldHitPos);
}
}
}
}