mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 22:39:22 +00:00
[BetterShadowClone] holyshit i overcomplicated it
This commit is contained in:
parent
1de39260f4
commit
c4099d90a0
5 changed files with 155 additions and 123 deletions
|
@ -13,7 +13,7 @@ public class FPRExclusion : MonoBehaviour
|
|||
internal List<Transform> affectedChildren = new();
|
||||
|
||||
[NonSerialized]
|
||||
internal ITransformHider[] relevantHiders;
|
||||
internal readonly List<IFPRExclusionTask> relatedTasks = new();
|
||||
|
||||
private void OnEnable()
|
||||
=> SetFPRState(true);
|
||||
|
@ -23,8 +23,13 @@ public class FPRExclusion : MonoBehaviour
|
|||
|
||||
private void SetFPRState(bool state)
|
||||
{
|
||||
if (relevantHiders == null) return; // no hiders to set
|
||||
foreach (ITransformHider hider in relevantHiders)
|
||||
hider.IsActive = state;
|
||||
if (relatedTasks == null) return; // no hiders to set
|
||||
foreach (IFPRExclusionTask task in relatedTasks)
|
||||
task.IsActive = state;
|
||||
}
|
||||
}
|
||||
|
||||
public interface IFPRExclusionTask
|
||||
{
|
||||
public bool IsActive { get; set; }
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue