parrying projectiles
All checks were successful
Create tag and build when new code gets to main / BumpTag (push) Successful in 28s
Create tag and build when new code gets to main / Export (push) Successful in 6m44s

This commit is contained in:
2026-05-14 16:11:22 +02:00
parent 0cd942d90e
commit a0e99a959f
11 changed files with 166 additions and 81 deletions

View File

@@ -13,6 +13,7 @@ using Gamesmiths.Forge.Godot.Resources.Abilities;
using Gamesmiths.Forge.Statescript;
using Gamesmiths.Forge.Tags;
using Godot;
using Movementtests.forge.abilities;
using Movementtests.interfaces;
using Movementtests.scenes.components.knockback;
using Movementtests.systems;
@@ -135,11 +136,12 @@ public partial class Enemy : CharacterBody3D,
private void ProjectileTokenRequested(EventData obj)
{
// TODO: replace with token manager
Events.Raise(new EventData
Events.Raise(new EventData<OnProjectileSpawned>
{
EventTags = Tag.RequestTag(TagsManager, "events.enemy.launch_projectile").GetSingleTagContainer()!,
Source = this,
Target = Target as IForgeEntity
Target = Target as IForgeEntity,
Payload = new OnProjectileSpawned(Vector3.Up, 20, Vector3.Up)
});
}
@@ -150,7 +152,7 @@ public partial class Enemy : CharacterBody3D,
public override void _PhysicsProcess(double delta)
{
// Only trigger gameplay related effects on specific frames
// Only trigger gameplay-related effects on specific frames
if(Engine.GetPhysicsFrames() % 10 == 0) ProcessGameplay(delta);
var targetPlanar = new Vector3(Target.GlobalPosition.X, GlobalPosition.Y, Target.GlobalPosition.Z);