public override bool AffectPlayer(Vector3 playerPosition, PlayerController playerController, DecisionItem decisionItem) { if (!decisionItem.IsItemCollected()) { GameObject effectInstance = Instantiate(effectPrefab, transform.position, effectPrefab.transform.rotation); effectInstance.transform.localScale = Vector3.one * 10; SfxAudioManager.Instance.PlaySound(collectionSound); } return(true); }
private void ActivateGoodDecisionPoint() { if (leftPoint != null) { DecisionController.Instance.ActivateLeftArrow(); } if (rightPoint != null) { DecisionController.Instance.ActivateRightArrow(); } if (topPoint != null) { DecisionController.Instance.ActivateTopArrow(); } if (bottomPoint != null) { DecisionController.Instance.ActivateBottomArrow(); } DecisionController.Instance.RegisterDecisionPoint(this); DecisionController.Instance.DecrementOffsetOnSuccessPlayer(this); if (!_decisionItem.IsItemCollected()) { BeliefController.Instance.AddBelief(beliefAmount); } // Use Decision Point Item List <string> combinedDialogues = new List <string>(decisionPointDialogue); if (!_decisionItem.IsItemCollected()) { combinedDialogues.AddRange(_decisionItem.textWorldObject); } WorldInfoTextDisplay.Instance.DisplayDialogues(combinedDialogues); switch (_decisionItem.decisionItemType) { case DecisionItemType.Artifact: case DecisionItemType.Scroll: case DecisionItemType.Coins: case DecisionItemType.Runes: break; case DecisionItemType.Hearing: _playerSenseController.CollectHearingSense(); BeliefController.Instance.ReduceBelief(beliefAmount * 2); // Hacky Fix break; case DecisionItemType.HeatProtection: _playerSenseController.CollectHeatResistance(); break; case DecisionItemType.ColdProtection: _playerSenseController.CollectColdResistance(); break; case DecisionItemType.GrayScaleSight: _playerSenseController.CollectGrayScaleSight(); BeliefController.Instance.ReduceBelief(beliefAmount * 2); // Hacky Fix break; case DecisionItemType.ColoredSight: _playerSenseController.CollectColoredSight(); BeliefController.Instance.ReduceBelief(beliefAmount); break; case DecisionItemType.Death: case DecisionItemType.None: break; default: throw new ArgumentOutOfRangeException(); } _decisionItem.MarkItemAsCollected(true); }