// Start is called before the first frame update
 void Start()
 {
     _itemsCollector         = GetComponentInChildren <ItemInRangeScript>();
     _collider               = GetComponent <CapsuleCollider>();
     _playerStructureManager = GetComponentInChildren <PlayerStructureManagerScript>();
     SetPlayerNumber(_playerNumber);
     _rb   = GetComponent <Rigidbody>();
     _anim = GetComponent <Animator>();
     GetComponent <HealthScript>().Health = _healthPoints[GamePropertyManager.Instance.Difficulty - 1];
 }
Ejemplo n.º 2
0
 public void UpdateResourceUI()
 {
     foreach (GameObject player in GetComponent <PlayerManager>().Players)
     {
         PlayerStructureManagerScript _PSM = player.GetComponent <PlayerStructureManagerScript>();
         for (int i = 0; i < _resourceValues.Count; i++)
         {
             _PSM.ResourceUI[i].text = _resourceValues[i].ToString();
         }
     }
 }