public void Run(INTERACTIBLE_TYPE originType, Transform _objectToCarry) { objectToCarry = _objectToCarry; carryable = objectToCarry.GetComponent <ICarryable>(); IsActive = true; }
public void Run(INTERACTIBLE_TYPE originType, Transform originTransform) { // TODO: Maybe make the ID related to conversation, not just generic. string conversationStartPoint = originTransform.GetComponent <IIdentifier>().Identifier; // Disable movement on player whilst talking (or give auto control if cutscene) playerInput.ToggleMovement(false); IsActive = true; // Start the thing up (buttons will load after initial) chatManager.StartDialogue(conversationStartPoint); }
public void Update(INTERACTIBLE_TYPE originType, Transform originTransform) { if (Task.ResponseType == RESPONSE_TYPE.CONTINUOUS) { Task.Next(); } if (Task.ResponseType == RESPONSE_TYPE.TOGGLE) { Task.Complete(); } }
public void OnInteracted(INTERACTIBLE_TYPE interactibleType, Transform interactibleTransform) { switch (interactibleType) { case INTERACTIBLE_TYPE.COLLECTIBLE: itemPickupHandler.Run(interactibleTransform); break; case INTERACTIBLE_TYPE.NPC: dialogueTriggeredHandler.Run(interactibleTransform); break; } }
public void Act(INTERACTIBLE_TYPE originType, Transform originTransform) { var matchedResponse = ResponseList.Find(r => r.InteractibleType == originType); ResponseMustFinish = ResponseList.Any(r => r.ContainsUnfinished()); if (matchedResponse == null) { return; } if (ResponseMustFinish) { matchedResponse.Update(originType, originTransform); } else { matchedResponse.Activate(originType, originTransform); } }
public void Run(INTERACTIBLE_TYPE originType, Transform originTransform) { var itemData = originTransform.GetComponent <ICollectible>(); if (itemData != null) { Debug.Log("Collected an item:"); Debug.Log(itemData); } else { throw new UnityException("Item was not available. Did you add an 'ICollectible' interface?"); } if (itemData.CollectibleItemObject.IsKeyItem) { KeyItemInventory.AddItem(itemData.CollectibleItemObject); } else { Inventory.AddItem(itemData.CollectibleItemObject); } }
public void Activate(INTERACTIBLE_TYPE originType, Transform originTransform) => Task.Run(originType, originTransform);
public void OnCancelled(INTERACTIBLE_TYPE interactibleType, Transform interactibleTransform) { // ... }
public void Cancel(INTERACTIBLE_TYPE originType, Transform originTransform) { Debug.Log($"{transform.name} got cancel signal from {originTransform.name}."); Debug.Log($"The interactible type of this mock is {InteractibleType}."); }
public void Run(INTERACTIBLE_TYPE originType, Transform originTransform) { Debug.Log("DataIO was instructed to save the game."); OnSaveSignal?.Invoke(); }
private void OnCancelled(INTERACTIBLE_TYPE originType, Transform originTransform) { Debug.Log($"{transform.name} cancelled its interaction with {originTransform.name}."); }
private void OnInteracted(INTERACTIBLE_TYPE originType, Transform originTransform) { Debug.Log($"{transform.name} interacted with {originTransform.name}."); }