We Are Cooked
A first-person zombie shooter and cooking game. Keep the customers fed while you hold off the zombies.

What I built
-
Interaction system
A sharedView the code for Interaction system (opens in a new tab)Interactablebase class with a prompt message and an optional UnityEvent hook. Cooking stations, ingredient spawners and the delivery counter all inherit from it and only overrideInteract(). -
Pickup system
Raycast from the camera to highlight, pick up, carry and drop ingredients and finished food. While you hold something, the tomato launcher is put away.View the code for Pickup system (opens in a new tab) -
Cooking system
Stations that check whether the right ingredients are on the counter, cook for five seconds and spawn the finished food. Recipes are set up in the Inspector.View the code for Cooking system (opens in a new tab) -
Delivery system
Random customer orders with a timer and a mood that drops as time runs out. Delivering faster scores more points.View the code for Delivery system (opens in a new tab)
Zombies and waves, the tomato launcher, the shop, health and saving were written by teammates. Player movement was shared work.
How it works
Interaction system
Everything you can use in the kitchen goes through one base class. Interactable stores the prompt the player sees and, when useEvents is on, fires a UnityEvent before calling the object’s own Interact(). That way sounds or effects can be hooked onto a station in the Inspector without writing extra code.
public abstract class Interactable : MonoBehaviour
{
public bool useEvents;
public string promptMessage;
public void BaseInteract(GameObject playerGameObject)
{
if (useEvents && TryGetComponent(out InteractionEvent interactionEvent))
interactionEvent.OnInteract.Invoke();
Interact(playerGameObject);
}
protected virtual void Interact(GameObject playerGameObject) { }
}
Pickup system
Each frame the player’s camera casts a ray on a pickable layer. An ingredient or food item under the crosshair gets a highlight; a second ray on a detectable layer shows the indicator on the nearest spawner or cooking station.
Picking something up parents it to a hold slot, makes its Rigidbody kinematic and hides the tomato launcher. While held, the item follows the camera with a lerp. Vertical movement lerps twice as fast as horizontal, so the item stays in view when you look up and down. The scroll wheel moves it closer or further away, clamped between a minimum and maximum distance. Dropping it gives physics back to the Rigidbody and brings the weapon back.
Cooking system
A CookingStation knows which recipe it makes. When the player interacts, it asks the IngredientManager to check the counter: a coroutine runs Physics.OverlapSphere every 0.5 seconds for up to 1.5 seconds, looking for the ingredients that recipe needs. Recipes are IngredientGroup entries in the Inspector (the required ingredients, how many of each, and the food prefab to spawn), loaded into a dictionary in Awake().
The station only listens through the small IIngredientCheckListener interface, so the manager doesn’t need to know what kind of station asked. If everything is there, the ingredients are removed and a five-second cooking routine starts. onCookingStarted and onCookingEnded UnityEvents go off for effects, and the finished food spawns with a Food component so the delivery system can recognise it.

IEnumerator IngredientCheckCoroutine(Ingredient.IngredientType type, Vector3 center,
IIngredientCheckListener listener)
{
float checkInterval = 0.5f;
float timeout = 1.5f;
float elapsed = 0f;
while (elapsed < timeout)
{
if (CheckIngredientsInRadius(type, center))
{
listener?.OnIngredientsReady();
yield break;
}
elapsed += checkInterval;
yield return new WaitForSeconds(checkInterval);
}
listener?.OnIngredientsMissing();
}
Delivery system
When there’s no active order, a new one is generated: a random food type and a quantity of one to three. With the script’s default settings the time limit is 120 seconds plus 50 seconds for every extra item, capped at 300. The order UI shows one icon per item, a countdown and the customer’s mood.
The mood comes from the share of time left: 75% or more is happy, 50% neutral, 25% frustrated, and below that the customer is angry. Points per item drop with the mood, from 100 down to 25. When the player interacts at the counter, food of the right type within the counter’s detection radius is counted, and if there’s enough the order is completed and scored.

public OrderState GetCurrentState(float happyThreshold, float neutralThreshold,
float frustratedThreshold)
{
float timeRemainingPercentage = GetTimeRemainingPercentage();
if (timeRemainingPercentage >= happyThreshold) return OrderState.Happy;
else if (timeRemainingPercentage >= neutralThreshold) return OrderState.Neutral;
else if (timeRemainingPercentage >= frustratedThreshold) return OrderState.Frustrated;
else return OrderState.Angry;
}
Challenges and solutions
Clearing ingredients a player is still holding
Problem
Starting a recipe destroys the ingredients in range. A player could still be holding one of them, which would leave their pickup script pointing at a destroyed object with the weapon hidden.
What I did
Before destroying an ingredient, the station goes through every object tagged Player and clears that player’s held item, resets the holding state and shows the tomato launcher again.
How to play
| Action | Keyboard & mouse | Controller |
|---|---|---|
| Move | WASD | Left stick |
| Shoot | Left mouse | R2 / LT |
| Pick up | E | R1 / RB |
| Interact with a station | F | △ / Y |
| Drop item | Q | L1 / LB |
| Navigate menus | ↑↓Enter |
Gallery
-
-
Choosing what to make. -