i'm knocking out a few of my early naive implementations and it feels awesome.

my structure is now

  • Generic Sword is a .asset file (created from the Weapon ScriptableObject)
  • Weapon is a class extending Item, but it specifies some weapon-specific attributes and carries logic for enabling and disabling its own hitbox
  • Item is a class extending ScriptableObject, and specifies some item-general attributes like a name and a rarity

all of this is edited in the Unity inspector now thanks to ScriptableObject, and although having Weapon handle behavior is still a little awkward, i think the full customization of the system will start to shine when i layer a Projectile class onto Hitbox and can make weapons do some truly interesting things.

i also realized that C# delegates were always a thing and i didn't have to go looking for UnityEvent to do that for me. but they have some minor differences that are useful to know! for my sake, the restrictions of C# delegates are actually safer so i'll probably switch to them whenever i think of it.

daily creative

work on something (gamedev, art, 3d modeling, music, ...) every day

joined 1,784 days ago

2024-11
2024-10
2024-09
2024-08
2024-07

Decade Jam

To help keep members of the Decade Jam on track with their projects!

joined 1,307 days ago