Hello, so i am using Odin - and i have a list of Effects that use IEffect.
The issue is an IEffect isnt being removed from a IEffect List
So, been following the videos of GitAmend using Generic Interfaces, Clean Targeting systems.
Everything was going fine, stuff gets damaged and all that.
Changed the Classes to structs, made the IEffect Factories - The factories create a struct to the target - target does apply on the struct with itself (an IDamagable),
IEffect DmgEffect applies to a IDamagable, Adds to a list, performs Damage, cancels it self and is removed from the list.
IEffect DmgOverTime does the same - but when the timer is stopped, calling the OnCompleted Action with itself, it isnt removed from the list.
Now this could be me misunderstanding how structs interact with everything but i thought to ask and try to learn.
Because from my perspective, its a Struct being made, assigned to a list, the struct's method is called, and via the logic it should cancels it self - and via the Monobehaviour should be removed from a list.
But it isnt.
Code
InstantDMG, works - it applies, it does DMG, it removes itself.
https://pastebin.com/eTkLJJse
OverTimeDMG, works until the removal process, it remains there.
https://pastebin.com/VxzYH8qU
Dmg Tester, far as i can tell, it works, prints the dmg it taken, tells me whats in the list, etc etc.
https://pastebin.com/DbieCmaT
Ability, where the IDamagable gets the effect from.
https://pastebin.com/0J3GVCP3
IEffect, interface + struct factory
https://pastebin.com/R1E6iMX3
Videos
https://www.youtube.com/watch?v=L0cXb-ettK4
https://www.youtube.com/watch?v=aZanRrhBg-8&t=417s
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.