Here's a really easy, quick animation with the script for your enemies. Currently, the enemies just move up and down in a wave pattern. However, the units themselves remain static.
Let's give our enemies a bit of extra life with some code:
- In the Project window, go to Assets/Resources/Prefab/Enemies.
- Expand the content of the enemy_wave prefab and select the enemy_wave_ring child game object.
- In the Inspector window, click on the Add Component button.
- Click on New Script at the bottom of the dropdown.
- Name the new C# script BasicEnemyRotate.
- Then, enter this code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class BasicEnemyRotate : MonoBehaviour
{
[SerializeField]
float speed = 0;
void Update ()
{
transform.Rotate(Vector3.left*Time.deltaTime*speed)
}
}