// Start is called before the first frame update void Start() { unitData = gameObject.GetComponent <UnitData>(); unitSelectable = gameObject.GetComponent <Selectable>(); unitParameters = gameObject.GetComponent <Parameters>(); battleState = BattleState.Instance; battleNavigate = gameObject.GetComponentInParent <BattleNavigate>(); hpBar = gameObject.GetComponentInChildren <HPScript>(); // Rocky HP bar stuff if (unitData.UnitWeapon != null) { weaponRange = GetComponent <UnitData>().UnitWeapon.range; } else { weaponRange = 1; } StartUnit(); hpBar.Start(); }