parrying projectiles
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user