using UnityEngine; using System.Collections; using UnityEngine.UI; public class GameEndImg : MonoBehaviour { public GameController gamecontroller; Image img; public Text text; // Use this for initialization void Start () { img = GetComponent (); } // Update is called once per frame void Update () { if (gamecontroller.deadplayers != 0) { text.text = gamecontroller.text; img.color = new Color (255f, 255f, 255f, 255f); } } }