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

public class Goal : MonoBehaviour
{

    private ParticleSystem parSys;

    private bool hasCompletedMap = false;
	// Use this for initialization
	void Start ()
    {
        parSys = transform.GetComponentInChildren<ParticleSystem>();
	}
	
	// Update is called once per frame
	void Update ()
    {
		
	}

    private void OnTriggerEnter(Collider other)
    {
        if (other.tag == "Player" && hasCompletedMap == false)
        {
            hasCompletedMap = true;
            print("Victory");
            parSys.Play();
        }
    }
}
