private void OnHarvestResponse(ICommandCallbackResponse <HarvestResponse> response) { if (response.StatusCode == StatusCode.Failure) { Debug.LogError("NPC failed to receive Harvest response"); return; } inventoryInterface.AddToInventory(response.Response.Value.resourcesTaken); StartCoroutine(ChangeStateAfter(SimulationSettings.NPCChoppingAnimationFinishTime, LumberjackFSMState.StateEnum.IDLE)); }
private void OnTriggerEnter(Collider other) { if (other.gameObject.CompareTag("Player")) { InventoryBehaviour playerInventory = other.gameObject.GetComponent <PlayerBehaviour>().GetInventory(); playerInventory.AddToInventory(this); gameObject.SetActive(false); } }