Beispiel #1
0
    public override void Interact(Pickupable heldItem)
    {
        // Debug.Log("Interact with DoorToHome whild holding: " + heldItem);
        if (heldItem && heldItem is ObjectivePickupable)
        {
            // Debug.Log("Held Item is ObjectivePickupable");
            ObjectivePickupable objectiveItem = (ObjectivePickupable)heldItem;
            GameProgress.CompleteObjective(objectiveItem.type);
            Object.Destroy(heldItem.gameObject);
        }

        StartCoroutine(EnterHome(heldItem));
        //EventBus.PublishEvent(new ReturnHomeEvent(heldItem));
        FMODUnity.RuntimeManager.PlayOneShotAttached("event:/SFX/Interactables/Door_Open", FindObjectOfType <PlayerMovement>().gameObject);
    }