2023-07-22 20:23:48 -07:00
|
|
|
using Godot;
|
2023-07-23 11:05:01 -07:00
|
|
|
using GodotUtilities;
|
2023-07-22 20:23:48 -07:00
|
|
|
|
|
|
|
namespace SupaLidlGame.Characters;
|
|
|
|
|
|
|
|
public abstract partial class Boss : Enemy
|
|
|
|
{
|
|
|
|
[Export]
|
|
|
|
public State.NPC.NPCStateMachine BossStateMachine { get; set; }
|
|
|
|
|
2023-07-23 11:05:01 -07:00
|
|
|
[Export]
|
|
|
|
public string BossName { get; set; }
|
|
|
|
|
2023-07-23 23:39:20 -07:00
|
|
|
[Export]
|
|
|
|
public AudioStream Music { get; set; }
|
|
|
|
|
2023-07-22 20:23:48 -07:00
|
|
|
public abstract int Intensity { get; }
|
|
|
|
|
2023-07-23 11:05:01 -07:00
|
|
|
private bool _isActive;
|
|
|
|
|
2023-07-22 20:23:48 -07:00
|
|
|
[Export]
|
2023-07-23 11:05:01 -07:00
|
|
|
public bool IsActive
|
|
|
|
{
|
|
|
|
get => _isActive;
|
|
|
|
set
|
|
|
|
{
|
|
|
|
_isActive = value;
|
|
|
|
|
|
|
|
// register or deregister ourselves when we are active/inactive
|
|
|
|
this.GetAncestor<Utils.World>()
|
|
|
|
.RegisterBoss(_isActive ? this : null);
|
|
|
|
}
|
|
|
|
}
|
2023-07-24 21:29:14 -07:00
|
|
|
|
|
|
|
public override void _Ready()
|
|
|
|
{
|
|
|
|
base._Ready();
|
|
|
|
}
|
2023-07-22 20:23:48 -07:00
|
|
|
}
|