// Use this for initialization void Start() { //TODO trigger this after resize hero = GameObject.Find ("Hero").GetComponent<Hero>(); GameObject lifeIndicator = GameObject.Find ("LifeIndicator"); Transform progressBar = lifeIndicator.transform.Find("ProgressBar"); _foreground = progressBar.transform.Find("Foreground"); _initialScale = _foreground.localScale; hero.setLife(startLife); }
// Use this for initialization void Start() { //TODO trigger this after resize if (GameObject.Find("Perso") != null) { hero = GameObject.Find("Perso").GetComponent <Hero>(); hero.setLife(startLife); } _lifeValueLabel = GameObject.Find("LifeValue").GetComponent <UILabel>(); _lifeValue = maxLife; }
// Use this for initialization void Start () { //TODO trigger this after resize if (GameObject.Find ("Perso") != null) { hero = GameObject.Find ("Perso").GetComponent<Hero>(); hero.setLife(startLife); } _lifeValueLabel = GameObject.Find("LifeValue").GetComponent<UILabel>(); _lifeValue = maxLife; }