hackerspace-ntnu / hackerspace-ntnu/Red-Planet-Rampage

Unsubscribe all (gun-related) delegates properly

Open
#973 0 comments 0 reactions 0 assignees View on GitHub
bug refactor
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.