Skip to content
Snippets Groups Projects
Portrait.cs 901 B
Newer Older
Michael LaFreniere's avatar
Michael LaFreniere committed
using UnityEngine;
using System.Collections;
using UnityEngine.UI;

// ** Can potentially merge with the money script.

// will change the top left player portrait based on the player appearance!
public class Portrait : MonoBehaviour {

    private setAppearance appearance;
    private PlayerStats stats;
    public Text playerName;
    public Image face;
    public Image head;
    public Color color;

	// Use this for initialization
	void Start () {
Michael LaFreniere's avatar
Michael LaFreniere committed
        stats = GameObject.Find("Player").GetComponent<PlayerStats>();
        appearance = GameObject.Find("Player").GetComponent<setAppearance>();
        color = appearance.getColor();
        playerName.text = stats.getName();
        face.sprite = appearance.getFace();
        head.sprite = appearance.getHead();
        face.color = color;
        head.color = color;
Michael LaFreniere's avatar
Michael LaFreniere committed
    }
	
	// Update is called once per frame
	void Update () {
	
	}
}