Added event handlers in Fieldbehaviour to react to watering can state changes
This commit is contained in:
@@ -79,9 +79,17 @@ public partial class FieldBehaviour2D : Sprite2D, ISaveable
|
||||
|
||||
public override void _EnterTree()
|
||||
{
|
||||
WateringCanState.OnFill += UpdateInteractionArea;
|
||||
WateringCanState.OnEmpty += UpdateInteractionArea;
|
||||
LoadFromSaveData();
|
||||
}
|
||||
|
||||
public override void _ExitTree()
|
||||
{
|
||||
WateringCanState.OnFill -= UpdateInteractionArea;
|
||||
WateringCanState.OnEmpty -= UpdateInteractionArea;
|
||||
}
|
||||
|
||||
public override void _Ready()
|
||||
{
|
||||
if(PlantingPlaceholder.GetChildCount() > 0)
|
||||
|
||||
Reference in New Issue
Block a user