Add event publishing for inventory and combat interactions
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
using GameCore.Combat.Effects;
|
||||
using GameCore.ECS;
|
||||
using GameCore.ECS.Interfaces;
|
||||
using GameCore.Events;
|
||||
using GameCore.Physics;
|
||||
|
||||
namespace GameCore.Combat;
|
||||
@@ -24,6 +25,7 @@ public class ProjectileSystem : ISystem
|
||||
var hit = world.WorldQuery.Raycast(position.Position, newPosition, projectileData.Owner);
|
||||
if (hit.DidHit)
|
||||
{
|
||||
world.PublishEvent(new ProjectileImpactEvent(projectile, hit));
|
||||
var hitContext = new EffectContext
|
||||
{
|
||||
World = world,
|
||||
|
||||
Reference in New Issue
Block a user