private void Update() { if (LocalPlayer.GameObject && this.WaterCollider) { CoopPlayerColliders componentInChildren = LocalPlayer.GameObject.GetComponentInChildren <CoopPlayerColliders>(); if (componentInChildren) { foreach (Collider collider in componentInChildren.WorldCollisionColiders) { Physics.IgnoreCollision(this.WaterCollider, collider, true); } base.enabled = false; } } }
private void Update() { if (LocalPlayer.GameObject && this.WaterCollider) { CoopPlayerColliders componentInChildren = LocalPlayer.GameObject.GetComponentInChildren <CoopPlayerColliders>(); if (componentInChildren) { Collider[] worldCollisionColiders = componentInChildren.WorldCollisionColiders; for (int i = 0; i < worldCollisionColiders.Length; i++) { Collider collider = worldCollisionColiders[i]; Physics.IgnoreCollision(this.WaterCollider, collider, true); } base.enabled = false; } } }