private void Start() { _decisionPointModifier = GetComponent <DecisionPointModifier>(); _decisionItem = GetComponent <DecisionItem>(); _collisionNotifier = GetComponentInChildren <CollisionNotifier>(); _collisionNotifier.OnTriggerEntered += HandleOnTriggerEnter; _collisionNotifier.OnTriggerExited += HandleOnTriggerExit; // Debug Check for Position if (decisionPointPosition == null) { Debug.LogError($"Warning No Decision Position: {gameObject.name}"); } }
private void ResetPlayerPositionOnFadeOut() { Vector3 safePosition = _lastSafeDecisionPoint.GetDecisionPointPosition(); playerController.SnapAndRevivePlayerToPosition(safePosition); foreach (DecisionPoint decisionPoint in _previousDecisionPoints) { // DecisionItem decisionItem = decisionPoint.GetDecisionItem(); // if (decisionItem) // { // ItemsCollectibleController.Instance.RemoveItemFromPlayerInventory(decisionItem); // decisionItem.MarkItemAsCollected(false); // } DecisionPointModifier decisionPointModifier = decisionPoint.GetDecisionPointModifier(); decisionPointModifier.ResetModifier(); ClearAllDecisionData(); if (_lastSafeDecisionPoint.LeftDecisionPoint != null) { ActivateLeftArrow(); } if (_lastSafeDecisionPoint.RightDecisionPoint != null) { ActivateRightArrow(); } if (_lastSafeDecisionPoint.TopDecisionPoint != null) { ActivateTopArrow(); } if (_lastSafeDecisionPoint.BottomDecisionPoint != null) { ActivateBottomArrow(); } } singleFader.StartFadeIn(); }