Ejemplo n.º 1
0
    public void _onAreaEnter(Area2D area)
    {
        if (area is Spike)
        {
            character.Restart();
        }

        if (area is Proj proj)
        {
            character.Bump(new Vector2((proj.IsDirectionRight() ? 1 : -1) * hbumpForce, -vbumpForce), bumpDuration);
            proj.QueueFree();
        }
    }