using UnityEngine;
using System.Collections;

public class SpawnEntry {

	public Vector2 Direction;
	public Vector2 Position;
    /// <summary>Time to start spawning</summary>
	public float time;
    /// <summary>Time between spawning</summary>
	public float interval;
    public int amount;
    public bool goodPawn;

    public SpawnEntry(Vector2 dir, Vector2 pos, float tim, int amountOfSpawns, float spawnInterval, bool areGood)
    {
        this.Direction = dir;
        this.Position = new Vector2(pos.x, pos.y);
        this.time = tim;
        this.amount = amountOfSpawns;
        this.interval = spawnInterval;
        this.goodPawn = areGood;
    }

    public SpawnEntry(int dir, Vector2 pos, float tim, int amountOfSpawns, float spawnInterval, bool areGood)
    {
        switch(dir)
        {
            case 1:
                this.Direction = new Vector2(0,1);
                break;
            case 2:
                this.Direction = new Vector2(1, 0);
                break;
            case 3:
                this.Direction = new Vector2(0, -1);
                break;
            case 4:
                this.Direction = new Vector2(-1, 0);
                break;
            default:
                this.Direction = new Vector2(0, 1);
                break;
        }
        
        this.Position = new Vector3(pos.x, pos.y);
        this.time = tim;
        this.amount = amountOfSpawns;
        this.interval = spawnInterval;
        this.goodPawn = areGood;
    }
}
