Beispiel #1
0
 // Update is called once per frame
 void OnGUI()
 {
     //Shop.BeginUIResizing ();
     if (player == null)
         player = GameObject.FindGameObjectWithTag("Player").GetComponent<HeroController>().Vitals;
     DrawEnergy ();
     //Shop.EndUIResizing ();
 }
Beispiel #2
0
    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();
    }
Beispiel #3
0
 private void Start()
 {
     vitals = GameObject.FindGameObjectWithTag("Player").GetComponent <VitalsScript>();
 }
 void Start()
 {
     showGUI = false;
     vitals  = GameObject.FindGameObjectWithTag("Player").GetComponent <VitalsScript>();
 }
Beispiel #5
0
 // Use this for initialization
 void Start()
 {
     player = GameObject.FindGameObjectWithTag("Player").GetComponent<HeroController>().Vitals;
     textures = GetComponentsInChildren<GUITexture>();
 }
Beispiel #6
0
    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();
    }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     player = new VitalsScript ();
     playerController = gameObject.GetComponent<HeroController> ();
     particle =GameObject.FindGameObjectWithTag ("Player"). GetComponent<ParticleSystem > ();
 }
Beispiel #8
0
    // Use this for initialization
    void Start()
    {
        //Score.memory = 110;
        Score.score = 100;
        vital = new VitalsScript ();

        ColorRepeat = 3;
        scorecolor = GameObject.Find ("Score").GetComponent<GUIText> ();
    }