refactor (#6)

Reviewed-on: #6
This commit was merged in pull request #6.
This commit is contained in:
2026-02-01 11:47:40 +00:00
parent dde3eaa52e
commit bfe951939d
71 changed files with 1583 additions and 661 deletions

View File

@@ -6,4 +6,9 @@ public partial class CollectableResource : Resource
{
[Export] public float Amount { get; set; } = 0.0f;
[Export] public CollectableType Type { get; set; }
/// <summary>
/// The skill to unlock when collected. Only used when Type is Skill.
/// </summary>
[Export] public SkillData Skill { get; set; }
}

View File

@@ -5,4 +5,5 @@ public enum CollectableType
Coin,
Kid,
Health,
Skill,
}

View File

@@ -10,11 +10,10 @@ public partial class SkillData : Resource
[Export] public string Name { get; set; } = "New Skill";
[Export] public string Description { get; set; } = "New Skill";
[Export] public Texture2D Icon { get; set; }
[Export] public bool IsActive { get; set; } = false;
[Export] public int Level { get; set; } = 1;
[Export] public SkillType Type { get; set; } = SkillType.Throw;
[Export] public PackedScene Node { get; set; }
[Export] public Array<SkillUpgrade> Upgrades { get; set; } = [];
public int MaxLevel => Upgrades.Count;
}