Exemple #1
0
    private void OnPlayerInteraction()
    {
        if (mCurrentCollider == null)
        {
            return;
        }

        ICollider    coll = mCurrentCollider.GetComponent <ICollider>();
        ColliderType type = coll.GetColliderType();

        Debug.Log("on player action:: " + name + " ::type:: " + type);

        switch (type)
        {
        case ColliderType.IngredientPlate:
            PickupIngredient();
            break;

        case ColliderType.PrepCounter:
            DropIngredient();
            break;

        case ColliderType.Customer:
            ServeToCustomer();
            break;
        }
    }