diff options
Diffstat (limited to 'Thronefall_1_57/Decompile/Thronefall/FreezePositionOnEnable.cs')
| -rw-r--r-- | Thronefall_1_57/Decompile/Thronefall/FreezePositionOnEnable.cs | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/Thronefall_1_57/Decompile/Thronefall/FreezePositionOnEnable.cs b/Thronefall_1_57/Decompile/Thronefall/FreezePositionOnEnable.cs deleted file mode 100644 index 60685aa..0000000 --- a/Thronefall_1_57/Decompile/Thronefall/FreezePositionOnEnable.cs +++ /dev/null @@ -1,25 +0,0 @@ -using UnityEngine; - -public class FreezePositionOnEnable : MonoBehaviour -{ - private Transform oldParent; - - private void OnEnable() - { - if (oldParent == null) - { - oldParent = base.transform.parent; - } - base.transform.SetParent(null); - base.transform.position = oldParent.position; - base.transform.rotation = oldParent.rotation; - } - - private void Update() - { - if (!oldParent.gameObject.activeInHierarchy) - { - base.transform.SetParent(oldParent); - } - } -} |
