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

public class PathingController : MonoBehaviour {

    public GameObject waypointPrefab;
    public ArrayList waypointList = new ArrayList();
    
    public GameObject enemyPrefab;

    private ArrayList enemyList = new ArrayList();

    int counter = 0;

    // Start is called before the first frame update
    void Start()
    {
        waypointList.Add(Instantiate(waypointPrefab, new Vector3(0, 0, 0), Quaternion.identity));
        waypointList.Add(Instantiate(waypointPrefab, new Vector3(0, 5, 0), Quaternion.identity));
        waypointList.Add(Instantiate(waypointPrefab, new Vector3(5, 5, 0), Quaternion.identity));
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    private void FixedUpdate() {
        if (counter == 0) {
            enemyList.Add(Instantiate(enemyPrefab));
            counter++;
        }
        else if (counter >= 50) {
            counter = 0;
        }
        else {
            counter++;
        }
    }
}
