GameEndImg.cs 459 B

1234567891011121314151617181920
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4. public class GameEndImg : MonoBehaviour {
  5. public GameController gamecontroller;
  6. Image img;
  7. public Text text;
  8. // Use this for initialization
  9. void Start () {
  10. img = GetComponent<Image> ();
  11. }
  12. // Update is called once per frame
  13. void Update () {
  14. if (gamecontroller.deadplayers != 0) {
  15. text.text = gamecontroller.text;
  16. img.color = new Color (255f, 255f, 255f, 255f);
  17. }
  18. }
  19. }