public void updateStatText()
 {
     playeremo.getCharacterStat(out encorage, out trustiness, out bravery);
     encorageout.text   = "Encourage :  " + encorage;
     trustinessout.text = "Trustiness : " + trustiness;
     braveryout.text    = "Bravery :" + bravery;
 }
    void OnGUI()
    {
        playeremo = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterEmotion>();
        playeremo.getCharacterStat(out encorage, out trustiness, out bravery);
        float posX = Screen.width * pos.x;
        float posY = Screen.height * pos.y;

        switch (selected)
        {
        case 1: status = bravery / 10f;
            break;

        case 2: status = encorage / 10f;
            break;

        case 3: status = trustiness / 10f;
            break;
        }


        //draw the background:
        GUI.BeginGroup(new Rect(posX, posY, 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 * status, size.y));
        GUI.Box(new Rect(0, 0, size.x * status, size.y), fullTex);

        GUI.EndGroup();
        GUI.EndGroup();
    }
 void Start()
 {
     playeremo = GameObject.FindGameObjectWithTag("Player").GetComponent <CharacterEmotion>();
     playeremo.getCharacterStat(out encorage, out trustiness, out bravery);
     encorageout.text   = "Encourage :  " + encorage;
     trustinessout.text = "Trustiness : " + trustiness;
     braveryout.text    = "Bravery :" + bravery;
 }