using UnityEngine;
using System.Collections;

public class PlayerB : Player {
	public GameObject trail;
	public float deltaTimeTrail;

	// Use this for initialization
	void Start () {
		StartCoroutine(leaveTrail());
	}
	
	// Update is called once per frame
	void Update () {
		
	}

	IEnumerator leaveTrail() {
		yield return new WaitForSeconds(deltaTimeTrail);
		GameObject o = (GameObject)Network.Instantiate(trail, transform.position, trail.transform.rotation, 0);
		StartCoroutine(o.GetComponent<Trail>().timedDestroy());
		o.transform.position = transform.position;
		o.transform.Find("BurningArea").gameObject.SetActive(true);
		StartCoroutine(leaveTrail());
	}
}
