Refactor collectable components to C# and update resource scripts for consistency

This commit is contained in:
2025-08-21 18:01:13 +02:00
parent d84f7d1740
commit 9d0f502cc2
16 changed files with 179 additions and 190 deletions

View File

@@ -28,9 +28,9 @@ public partial class RequirementComponent : Node
}
}
private void OnCollected(Variant amount, CollectableType type, Node2D body)
private void OnCollected(float amount, CollectableType type, Node2D body)
{
AddProgress(amount.As<int>());
AddProgress((int)amount);
}
private void AddProgress(int amount = 1)