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