mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-01 09:45:33 +00:00
35 lines
No EOL
604 B
C#
35 lines
No EOL
604 B
C#
using Godot;
|
|
|
|
namespace Cirno.Scripts.Components.Actors;
|
|
|
|
public partial class PlayerHitboxSpriteProvider : Node2D
|
|
{
|
|
[Export]
|
|
public AnimatedSprite2D Hitbox { get; private set; }
|
|
[Export]
|
|
public AnimatedSprite2D Circle { get; private set; }
|
|
|
|
public void SetVisibility(bool isVisible)
|
|
{
|
|
if (isVisible)
|
|
{
|
|
Show();
|
|
}
|
|
else
|
|
{
|
|
Hide();
|
|
}
|
|
}
|
|
|
|
public void Show()
|
|
{
|
|
Hitbox.Show();
|
|
Circle.Show();
|
|
}
|
|
|
|
public void Hide()
|
|
{
|
|
Hitbox.Hide();
|
|
Circle.Hide();
|
|
}
|
|
} |