# Concrete Class: Food

Based on the video in [Customization Steps](/cs2335/f20_bkup_v2/inventory-system/inventory-scriptableobject/customization-steps.md), this section provides details of how to create your own custom type of items that can be used in the InventorySystem. &#x20;

The video below shows how to import updated InventorySystem scripts and how to write code to create your own custom concrete class and scriptable objects as required for project 3.

{% embed url="<https://youtu.be/JORC1qx6gf8>" %}

*Note, the video above shows that an additional step may be required when implementing the constructor for your custom concrete child class.  Make sure to include setting **`instanceType`** in the child class constructor as shown below, this step may not have been included in all videos, as it was part of the updated code modification for InventorySystem version2 on 4/11/2020.*

```csharp
instanceType = foodType.ToString(); //make sure to add code similar to this in the constructor
```

You will create a concrete child class:  In this example:  Food:

```csharp
//updated 4/11/2020

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public enum FoodType {  Cake, Cheese, Watermelon}

public class Food : Item
{
    public FoodType foodType;

    public Food() //constructor
    {
        itemType = ItemType.Food;
        instanceType = foodType.ToString();
    }

    public override void Use()
    {
        GameData.instanceRef.BoostHealth(this.value);

    }
} //end of class
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://kdoore.gitbook.io/cs2335/f20_bkup_v2/inventory-system/inventory-scriptableobject/customization-steps/concrete-class-food.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
