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}"); } }
public static List <DecisionItem> getDecisionList(string helpText) { string decisionGroup = retriveDecisionGroupFromActivityHelpText(helpText); List <DecisionItem> returned = new List <DecisionItem>(); using (EServicesDBContext a = new EServicesDBContext()) { var decisions = !string.IsNullOrEmpty(helpText)?(from p in a.view_DecisionChoices where p.LookupGroup.Equals(decisionGroup) select new { p.TextAR, p.TextEN, p.Lookup_Item_ID, p.CommentsMandatory }).ToArray() : (from p in a.view_DecisionChoices select new { p.TextAR, p.TextEN, p.Lookup_Item_ID, p.CommentsMandatory }).ToArray(); foreach (var oneRecord in decisions) { DecisionItem oneDecision = new DecisionItem(); oneDecision.Value = oneRecord.Lookup_Item_ID; oneDecision.TextAR = oneRecord.TextAR; oneDecision.TextEN = oneRecord.TextEN; oneDecision.CommentsAreMandatory = oneRecord.CommentsMandatory; returned.Add(oneDecision); } } return(returned); }
public override bool AffectPlayer(Vector3 playerPosition, PlayerController playerController, DecisionItem decisionItem) { foreach (Rigidbody fallItem in fallItems) { fallItem.isKinematic = false; } _itemsThrown = true; _currentFallTime = makeItemsDestroyAfterTime; return(false); }
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); }
public void RemoveItemFromPlayerInventory(DecisionItem decisionItem) { // TODO: Implement this function }
public override bool AffectPlayer(Vector3 playerPosition, PlayerController playerController, DecisionItem decisionItem) { SfxAudioManager.Instance.PlaySound(deathAudioClip); playerController.PlayDeathAnimation(); return(false); }
public override bool AffectPlayer(Vector3 playerPosition, PlayerController playerController, DecisionItem decisionItem) { playerController.PlayFallDeathAnimation(movePlayerToPoint); return(false); }
public virtual bool AffectPlayer(Vector3 playerPosition, PlayerController playerController, DecisionItem decisionItem) { return(true); }