Exemplo n.º 1
0
 void Start()
 {
     _canvasTransform = transform.FindChild("Canvas").transform;
     _hpSlider        = transform.FindChild("PlayerSprite/Canvas/HPSlider").GetComponent <HPSliderControl>();
     _hpSlider.InitHpSlider(_attributeDictionary[PropertiesEnum.HP].Value, _attributeDictionary[PropertiesEnum.MaxHP].Value);
     // Timer
     InvokeRepeating("HPUpdate", 0, 0.05f);
 }