# AI Enemies

This project includes a slime prefab that we can use. In the project window search for slime and double click the "Enemy\_Slime" prefab.&#x20;

<figure><img src="/files/fLqL2N7FoolB1P6TJcI9" alt="" width="281"><figcaption></figcaption></figure>

There are several components added for you already, lets break them down.

Airship's multiplayer is powered by FishNet, a multiplayer package for Unity. You'll see some if its components here for managing the networking of an object.

* NetworkObject is any object that is synced across the network.
* NetworkTransform means this object will move
* NetworkTickSmoother is an Airship component that adds some nice smoothing to our NetworkTransforms. \***Notice that this points to a GraphicsHolder which is a child of the root and holds all of the visual graphics for the object. This is an important structure to maintain if you want smoothed transforms.**

<figure><img src="/files/ZpAzViK5p78jkcAuotYJ" alt=""><figcaption></figcaption></figure>

We also have a Rigidbody and Box Collider on this object which is just standard Unity setup for a moving physics object. We locked the rotation since we will control that in our code and froze the Y since this game is flat.

<figure><img src="/files/11ABoDtq0zjEvqUgSnx1" alt=""><figcaption></figcaption></figure>

The first step is to get an enemy spawning into the world. Lets make a new AirshipBehaviour class that will spawn in our enemies.&#x20;

* In VSCode create a new class and call it "TopDownBattleEnemySpawner.ts". This will be similar to our player spawner but will instantiate the enemy prefab over time and randomly around the map


---

# 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://docs.airship.gg/guides/tutorial-top-down-battle/ai-enemies.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.
