setLife() public method

public setLife ( float life ) : void
life float
return void
Esempio n. 1
0
    // 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);
    }
Esempio n. 2
0
    // 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;
    }
Esempio n. 3
0
	// 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;
		

	}