Exemple #1
0
        private void OnTriggerExit(Collider other)
        {
            if (isLocalPlayer && other.gameObject != base.gameObject && !other.transform.IsChildOf(base.transform) && (bool)other.gameObject.GetComponent <FreeAirZone>())
            {
                turnPlentifulAreaTriggerLightsOn(other.gameObject.GetComponent <FreeAirZone>(), isOn: false);
                setBubbleColor(new Color32(byte.MaxValue, byte.MaxValue, byte.MaxValue, byte.MaxValue));
                State = DivingState.HoldingBreath;
                logEnterNoAirBI();
            }
            ShareBubble component = other.gameObject.GetComponent <ShareBubble>();

            if (component != null && !other.transform.IsChildOf(base.transform))
            {
                DivingGameController componentInParent = other.gameObject.GetComponentInParent <DivingGameController>();
                if (componentInParent != null)
                {
                    overlappingBubbles.Remove(componentInParent);
                }
            }
        }
Exemple #2
0
        private void OnTriggerEnter(Collider other)
        {
            if (isLocalPlayer)
            {
                if (other.gameObject != base.gameObject && !other.transform.IsChildOf(base.transform) && (bool)other.gameObject.GetComponent <FreeAirZone>())
                {
                    handleEnteringFreeAirZone(other);
                }
                else if (other.gameObject.CompareTag("TutorialTrigger") && Service.Get <TutorialManager>().TryStartTutorial(FindingAirTutorialDefinition.Id))
                {
                    State = DivingState.PlentifulAir;
                }
            }
            ShareBubble component = other.gameObject.GetComponent <ShareBubble>();

            if (component != null && !other.transform.IsChildOf(base.transform))
            {
                DivingGameController componentInParent = other.gameObject.GetComponentInParent <DivingGameController>();
                if (componentInParent != null)
                {
                    overlappingBubbles.Add(componentInParent);
                }
            }
        }