DefenseMatrixManager
Library that allows for mods to add entities that can block hitscan attacks on a per-team basis.
Last updated | 2 months ago |
Total downloads | 70029 |
Total rating | 0 |
Categories | Mods Libraries |
Dependency string | Moffein-DefenseMatrixManager-1.0.2 |
Dependants | 24 other packages depend on this package |
This mod requires the following mods to function
bbepis-BepInExPack
Unified BepInEx all-in-one modding pack - plugin framework, detour library
Preferred version: 5.4.2117README
DefenseMatrixManager
Allows mods to create Defense Matrixes that can block hitscan attacks on a per-team basis.
Projectile deletion functionality is not included, and should be handled by your own custom logic.
This mod was mainly made for my own personal mods since they share this functionality.
How to Implement
-
Create a
DefenseMatrixManager.DefenseMatrixInfo
instance.- This should contain all colliders to be included.
- TeamIndex of the owner.
-
Add
DefenseMatrixInfo
instance to theDefenseMatrixManager
usingDefenseMatrixManager.AddMatrix(DefenseMatrixInfo)
. -
When destroying your GameObject, remove your
DefenseMatrixInfo
usingDefenseMatrixManager.RemoveMatrix(DefenseMatrixInfo)
.
If you want to automatically handle DefenseMatrix
instance lifecycle, add a DefenseMatrixComponent
to your prefab (requires TeamFilter
), and it will automatically handle it for you.