hackerspace-ntnu / hackerspace-ntnu/Red-Planet-Rampage
Unsubscribe all (gun-related) delegates properly
- Dominant language
- C#
- Stars
- 32
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
This _should_ fix most of the issues with weapon switching.
We need to refactor all unsubbing to happen in the same class as the subscription happens.
Look at the GunController delegates in particular.
So what we need to do
- [ ] Ensure all GunController delegates have + and - in the same class as where the subscribed method is from
- [ ] Refactor all GunBody/Barrel/Extension classes to have a dedicated subscribe/unsubscribe method? (imo they should all have been modifiers, then much of this would've been solved already...)
- [ ] and ensure that ProjectileModifier.Detach() is actually called (!!!)
- [ ] Find other occurences of this (oh joy)
Contributor guide
Assessment
This issue has not been assessed yet.