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

public class WinText : MonoBehaviour {
    public Text text;
    public string msg;
    public GameTimer gt;

    public Animator fadeScreenAnim;




	// Use this for initialization
	void Start () {
        text = GetComponent<Text>();


	}

	


	// Update is called once per frame
	void Update () {


        if (gt.gameOver)
            fadeScreenAnim.SetBool("readyToFadeOut", true);


        text.text = msg;

        if (gt.p1Wins)
        {
            msg = " PUPPIES WIN!!!" ;
        }

        if (gt.p2Wins)
        {
            msg = " KITTIES WIN!!!";
        }

        if (gt.tie)
        {
            msg = "EVERYBODY WINS!!!";
        }
	}
}
