mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-06 16:25:54 +00:00
35 lines
604 B
C#
35 lines
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();
|
|||
|
|
}
|
|||
|
|
}
|