// Use this for initialization void Start() { hpanel = Object.FindObjectOfType <UIHealthPanel>(); hp = maxHP; rigidbod = GetComponent <Rigidbody2D>(); sprRend = GetComponent <SpriteRenderer>(); sprRend.sprite = stand; }
void Start() { mainCamera = GameObject.FindGameObjectWithTag("MainCamera"); healthpanel = GameObject.FindObjectOfType <UIHealthPanel> (); xpSlider = GameObject.FindObjectOfType <UIXPSlider>(); healthpanel.SetHealth(playerHP); //moneyCount.text = "$" + playerMoney; sound = GetComponent <AudioSource> (); }
public void Awake() { instance = this; }