// Update is called once per frame void OnGUI() { //Shop.BeginUIResizing (); if (player == null) player = GameObject.FindGameObjectWithTag("Player").GetComponent<HeroController>().Vitals; DrawEnergy (); //Shop.EndUIResizing (); }
public VitalsScript vitals; //current progress #endregion Fields #region Methods void OnGUI() { if (vitals == null) vitals = GameObject.FindGameObjectWithTag("Player").GetComponent<HeroController>().Vitals; GUI.BeginGroup(new Rect(pos.x, pos.y, size.x, size.y)); GUI.Box(new Rect(0,0, size.x, size.y), emptyTex); //draw the filled-in part: GUI.BeginGroup(new Rect(0,0, size.x * VitalsScript .CurrentEnergy, size.y)); GUI.Box(new Rect(0,0, size.x, size.y), fullTex); GUI.EndGroup(); GUI.EndGroup(); }
private void Start() { vitals = GameObject.FindGameObjectWithTag("Player").GetComponent <VitalsScript>(); }
void Start() { showGUI = false; vitals = GameObject.FindGameObjectWithTag("Player").GetComponent <VitalsScript>(); }
// Use this for initialization void Start() { player = GameObject.FindGameObjectWithTag("Player").GetComponent<HeroController>().Vitals; textures = GetComponentsInChildren<GUITexture>(); }
void Start() { OnElevator = false; //power.HeroStartCharge = false; anim = GetComponent<Animator>(); particle = GetComponent<ParticleSystem>(); Collider2D[] col = GetComponentsInChildren<Collider2D>(); foreach (Collider2D cc in col) cc.isTrigger = false; anim.SetBool("Dead", false); lastHitTime = Time.time; if (Application .loadedLevelName != "MainMenu") Vitals = new VitalsScript(); HeroController.GameOver = false; restarting = false; falling = true; originalHelmetPositionX = Helmet.transform.position.x; jumping = false; saveMemory (); CheckPoint.Check(); }
// Use this for initialization void Start() { player = new VitalsScript (); playerController = gameObject.GetComponent<HeroController> (); particle =GameObject.FindGameObjectWithTag ("Player"). GetComponent<ParticleSystem > (); }
// Use this for initialization void Start() { //Score.memory = 110; Score.score = 100; vital = new VitalsScript (); ColorRepeat = 3; scorecolor = GameObject.Find ("Score").GetComponent<GUIText> (); }