using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using DG.Tweening;

public class WeAreTheChampions : MonoBehaviour {

    public GameObject VictoryEffects;

	void OnCollisionEnter(Collision col) {
        if(col.gameObject.CompareTag("Player")) {
            RigidbodyFirstPersonController control = col.gameObject.GetComponent<RigidbodyFirstPersonController>();
            if(control != null) {
                control.enabled = false;
            }
            VictoryEffects.SetActive(true);
            AudioManager.Get.PlaySFX("WeAreTheChampions");
            Sequence seq = DOTween.Sequence();
            seq.AppendInterval(1.5f);
            seq.AppendCallback(()=>UnityEngine.SceneManagement.SceneManager.LoadScene(0));
        }
    }
}
