/// <summary>
    /// Create an empty game object with a spawner component
    /// </summary>
    /// <param name="enemyType"> The enemy that will spawn from the new
    /// spawner</param>
    private void CreateSpawner(EnemyTypes enemyType)
    {
        Stack <CombatSpawner> choosenStack = spawnerGroups[(int)enemyType];
        GameObject            parent       = _groups[(int)enemyType];


        if (parent == null)
        {
            parent = new GameObject(_groupnames[(int)enemyType]);
            _groups[(int)enemyType]   = parent;
            parent.transform.position = gameObject.transform.position;
            parent.transform.SetParent(gameObject.transform);
        }



        SyncStackToScene(choosenStack, parent);

        GameObject    go = new GameObject($"{enemyType.ToString()} Spawner {parent.transform.childCount} - {gameObject.name}");
        CombatSpawner cs = go.AddComponent <CombatSpawner>();

        cs.enemy = enemyType;


        go.transform.SetParent(parent.transform);

        // Put new spawner in the location & rotation of the last made spawner
        // of the same type if it exists, if it doesn't put it in the group
        // holder object's location
        if (choosenStack.Count > 1)
        {
            //print($"Position of {choosenStack.Peek().name}: {choosenStack.Peek().transform.position}");
            //print($"Local Position of {choosenStack.Peek().name}: {choosenStack.Peek().transform.localPosition}");

            go.transform.localPosition = choosenStack.Peek().transform.localPosition;
            go.transform.localRotation = choosenStack.Peek().transform.localRotation;
        }

        else
        {
            go.transform.localPosition = parent.transform.localPosition;
            go.transform.localRotation = parent.transform.localRotation;
        }


        choosenStack.Push(cs);

        // Update the parent's name to show how many children (spawners) it
        // has.
        parent.name = _groupnames[(int)enemyType] + $"- {parent.transform.childCount}";
    }
    /// <summary>
    /// Remove null spawners from the tip of the stack
    /// </summary>
    /// <param name="stack">The stack to clean</param>
    private void CleanStack(Stack <CombatSpawner> stack)
    {
        if (stack.Count == 0)
        {
            return;
        }
        CombatSpawner cs = stack.Peek();

        while (cs == null)
        {
            stack.Pop();
            cs = stack.Peek();
        }
    }
	public void GetSpawnInformation(GameObject _spawner)
	{
		spawner = _spawner.GetComponent<CombatSpawner>();
		SetSpawnInformation ();
	}