private void Start() { PlayerReflection.TargetPlayer = GameManager.Instance.PrimaryPlayer; PlayerReflection.MirrorSprite = MirrorSprite; if (!isGlitched) { if (GameManager.Instance.CurrentGameType == GameManager.GameType.COOP_2_PLAYER) { CoopPlayerReflection.TargetPlayer = GameManager.Instance.SecondaryPlayer; CoopPlayerReflection.MirrorSprite = MirrorSprite; } else { CoopPlayerReflection.gameObject.SetActive(false); } } else { PlayerReflection.gameObject.SetActive(false); CoopPlayerReflection.gameObject.SetActive(false); tk2dBaseSprite[] AllMirrorSprites = gameObject.GetComponents <tk2dBaseSprite>(); if (AllMirrorSprites != null && AllMirrorSprites.Length > 0) { ExpandShaders.Instance.ApplyGlitchShader(AllMirrorSprites[0]); } } IntVector2 MirrorChestPosition = (base.transform.position.IntXY(VectorConversions.Round) + new IntVector2(0, -2) - m_ParentRoom.area.basePosition); if (spawnBellosChest) { MirrorChest = ExpandUtility.GenerateChest(MirrorChestPosition, m_ParentRoom, PickupObject.ItemQuality.A, 0, false); MirrorChest.forceContentIds = new List <int>() { 435, 493 }; } else { MirrorChest = ExpandUtility.GenerateChest(MirrorChestPosition, m_ParentRoom, null, -1f); } MirrorChest.PreventFuse = true; SpriteOutlineManager.RemoveOutlineFromSprite(MirrorChest.sprite, false); Transform transform = MirrorChest.gameObject.transform.Find("Shadow"); if (transform) { MirrorChest.ShadowSprite = transform.GetComponent <tk2dSprite>(); } MirrorChest.IsMirrorChest = true; MirrorChest.ConfigureOnPlacement(m_ParentRoom); m_ParentRoom.RegisterInteractable(MirrorChest); if (spawnBellosChest) { MirrorChest.DeregisterChestOnMinimap(); } if (MirrorChest.majorBreakable) { MirrorChest.majorBreakable.TemporarilyInvulnerable = true; } ChestSprite = MirrorChest.sprite; ChestSprite.renderer.enabled = false; ChestReflection.TargetSprite = ChestSprite; ChestReflection.MirrorSprite = MirrorSprite; SpeculativeRigidbody specRigidbody = MirrorSprite.specRigidbody; specRigidbody.OnRigidbodyCollision = (SpeculativeRigidbody.OnRigidbodyCollisionDelegate)Delegate.Combine(specRigidbody.OnRigidbodyCollision, new SpeculativeRigidbody.OnRigidbodyCollisionDelegate(HandleRigidbodyCollisionWithMirror)); MinorBreakable componentInChildren = GetComponentInChildren <MinorBreakable>(); componentInChildren.OnlyBrokenByCode = true; componentInChildren.heightOffGround = 4f; IPlayerInteractable[] TableInterfacesInChildren = GameObjectExtensions.GetInterfacesInChildren <IPlayerInteractable>(gameObject); for (int i = 0; i < TableInterfacesInChildren.Length; i++) { if (!m_ParentRoom.IsRegistered(TableInterfacesInChildren[i])) { m_ParentRoom.RegisterInteractable(TableInterfacesInChildren[i]); } } // Destroy(gameObject.GetComponent<MirrorController>()); // SpeculativeRigidbody InteractableRigidMirror = gameObject.GetComponent<SpeculativeRigidbody>(); // InteractableRigidMirror.Initialize(); // PhysicsEngine.Instance.RegisterOverlappingGhostCollisionExceptions(InteractableRigidMirror, null, false); }