Ejemplo n.º 1
0
 // Start is called before the first frame update
 void Start()
 {
     pb                 = transform.root.gameObject.GetComponent <PlayerBase>();
     soldier            = transform.root.gameObject;
     soldierStat        = transform.root.gameObject.GetComponent <SoldierStat>();
     soldierNumber      = FindObjectOfType <SoldierNumber>();
     soldierFactory     = FindObjectOfType <SoldierFactory>();
     soldierHealth.text = pb.hp + "/" + pb.hp;
     soldierPower.text  = pb.power + "/" + pb.power;
 }
Ejemplo n.º 2
0
 // Start is called before the first frame update
 void Start()
 {
     soldierStat = GetComponent <SoldierStat>();
     col         = GetComponent <BoxCollider2D>();
 }
Ejemplo n.º 3
0
 // Start is called before the first frame update
 void Start()
 {
     st = GetComponent <SoldierStat>();
     panel.SetActive(false);
 }