예제 #1
0
 private void OnTriggerExit(Collider other)
 {
     if (other.CompareTag("ContactZone"))
     {
         toolsManager.canDrop = true;
         toolsManager.DeactivateActionInfo();
         isInContact = false;
     }
 }
예제 #2
0
 private void OnTriggerExit(Collider other) // turn off symbol when removing the egg
 {
     if (other.CompareTag("ContactZoneNests"))
     {
         isInContact          = false;
         toolsManager.canDrop = true;
         toolsManager.DeactivateActionInfo();
     }
 }
예제 #3
0
 // Change dialogue possibility to false if Oksusu exits the dialogue zone
 void OnTriggerExit(Collider colliderInfo)
 {
     if (colliderInfo.CompareTag("DialogueInput"))
     {
         isDialoguePossible  = false;
         toolManager.canDrop = true;
         toolManager.DeactivateActionInfo();
     }
 }
예제 #4
0
    private void Update()
    {
        if (isFacingWater)
        {
            toolManager.canDrop = false;
            toolManager.ActivateActionInfo(actionName, 1, requiredToolName);
            if (Inventory.instance.isUsingTool(requiredToolName))
            {
                if (Input.GetButtonUp("Action") && !toolManager.usingATool)
                {
                    GetComponentInParent <PlayerMovement>().animator.SetBool("pickUp", true);
                    toolManager.StartCoroutine("UseTool");

                    toolManager.CarryItem(true, filledRecipient);

                    Inventory.instance.RemoveByName(requiredToolName);
                    Inventory.instance.Add(filledRecipient);
                    Inventory.instance.ChangeActiveTool(filledRecipient);

                    toolManager.DeactivateActionInfo();
                }
            }
        }
    }
    private void Update()
    {
        if (isInContact)
        {
            toolsManager.ActivateActionInfo(actionName, 1, requiredToolName, null);
            if (Inventory.instance.isUsingTool(requiredToolName))
            {
                if (Input.GetButtonUp("Action") && !toolsManager.usingATool)
                {
                    toolsManager.StartCoroutine("UseTool");

                    Inventory.instance.RemoveByName(requiredToolName);
                    Inventory.instance.Add(emptyRecipient);
                    Inventory.instance.ChangeActiveTool(emptyRecipient);

                    ChangeAnimation();
                    player.transform.LookAt(new Vector3(transform.position.x, player.transform.position.y, transform.position.z));

                    toolsManager.CarryItem(true, emptyRecipient);
                    toolsManager.DeactivateActionInfo();
                }
            }
        }
    }