/// <summary> /// Handles when a VR player collides with the entrance /// </summary> private void OnTriggerEnter(Collider other) { if (!isServer) { return; } // if (other.CompareTag("Player")) { VRCombat combat = other.GetComponent <VRCombat>(); if (!combat) { combat = other.transform.parent.GetComponent <VRCombat>(); } if (!combat.IsInvulnerable && combat.GetRelicCount() == 2 && manager.CurrGamePhase != GamePhase.Over) { Win(combat); } } }
/// <summary> /// Appropriately adjust values to reflect winning /// </summary> /// <param name="combat">The VRcombat with the relics</param> private void Win(VRCombat combat) { manager.SetPhaseTo(GamePhase.Over); RpcAlertVRWin(combat.GetRelicCount()); }