Added Human parts

This commit is contained in:
Samuele Lorefice
2024-12-31 04:06:14 +01:00
parent abfde63278
commit 3380ad963c
36 changed files with 266 additions and 35 deletions

20
Parts/Part.cs Normal file
View File

@@ -0,0 +1,20 @@
namespace WaifuCellar.Parts;
public abstract class Part {
public abstract List<IBuff> Buffs { get; set; }
public abstract Part? ParentPart { get; set; }
// limbs
public abstract List<Part> AttachedParts { get; }
public virtual void AddPart(Part part) {
AttachedParts.Add(part);
part.ParentPart = this;
}
public virtual void RemovePart(Part part) {
AttachedParts.Remove(part);
part.ParentPart = null;
}
public virtual void RemoveSelf() => ParentPart?.RemovePart(this);
}