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

public class Enemy : MonoBehaviour {

	public int score;
	// Use this for initialization
	void Start () {
		gameObject.GetComponent<Animator>().Play(0, -1, Random.Range(0.0f, 1.0f));
		transform.position = new Vector3(transform.position.x, transform.position.y, transform.position.z + Random.Range(0.00001f, 0.01000f));
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	public void killAnimation()
	{
		Animator animator = gameObject.GetComponent<Animator>();
		animator.SetTrigger("killEnemy");

	}
	public void spawnNew(Vector3 newPosition)
	{
		//gameObject.SetActive(false);
		transform.position = newPosition;
		gameObject.GetComponent<Animator>().Play("Idle");
	}
}
