summaryrefslogtreecommitdiff
path: root/GameCode/DisableIfSimple.cs
diff options
context:
space:
mode:
Diffstat (limited to 'GameCode/DisableIfSimple.cs')
-rw-r--r--GameCode/DisableIfSimple.cs17
1 files changed, 17 insertions, 0 deletions
diff --git a/GameCode/DisableIfSimple.cs b/GameCode/DisableIfSimple.cs
new file mode 100644
index 0000000..514da3d
--- /dev/null
+++ b/GameCode/DisableIfSimple.cs
@@ -0,0 +1,17 @@
+using UnityEngine;
+
+public class DisableIfSimple : MonoBehaviour
+{
+ private void Start()
+ {
+ Unparent componentInParent = GetComponentInParent<Unparent>();
+ if ((bool)componentInParent && (bool)componentInParent.parent)
+ {
+ base.gameObject.SetActive(!componentInParent.parent.root.GetComponentInChildren<PlayerSkinHandler>().simpleSkin);
+ }
+ else
+ {
+ base.gameObject.SetActive(!base.transform.root.GetComponentInChildren<PlayerSkinHandler>().simpleSkin);
+ }
+ }
+}