redirection tiles

This commit is contained in:
Rendo 2025-07-29 05:11:50 +05:00
commit f3a6f7a05a
27 changed files with 369 additions and 70 deletions

View file

@ -0,0 +1,21 @@
using Godot;
using Newlon.Systems.Effects;
namespace Newlon.Components;
public partial class AreaOfEffect : Area2D
{
[Export] public Effect givenEffect;
public override void _Ready()
{
AreaEntered += OnAreaEntered;
}
public void OnAreaEntered(Area2D what)
{
if (what.GetParent() is Entity entity)
{
entity.GiveEffect(givenEffect);
}
}
}