Commit 31b8844a by Raphael

Bound score

parent 561e1b89
No preview for this file type
using System;
using UnityEngine;
using System.Collections;
using Assets.Scripts;
using UnityEngine.UI;
public class UIController : MonoBehaviour
{
public Text Distance;
public Text Score;
public Text HighScore;
public Text NbVials;
public Image Vial1;
public Image Vial2;
public Image Vial3;
private Player _player;
void Start ()
{
_player = GameObject.FindWithTag("Player").GetComponent<Player>();
}
void Update ()
{
var score = _player.Score + int.Parse(Distance.text);
Score.text = (_player.Score + score).ToString();
}
}
fileFormatVersion: 2
guid: 8b13038290b17904d97cde1da98f964c
timeCreated: 1477403948
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment