Esempio n. 1
0
 // Start is called before the first frame update
 void Start()
 {
     charController = gameObject.GetComponent <CharacterController>();
     hp             = maxHp;
     shots          = maxShots;
     center         = GameObject.FindGameObjectWithTag("Center").GetComponent <Center>();
     hpBar          = GameObject.FindGameObjectWithTag("Hp_bar").GetComponent <Text>();
     shotBar        = GameObject.FindGameObjectWithTag("Shot_bar").GetComponent <Text>();
     controller     = GameObject.FindGameObjectWithTag("GameController").GetComponent <Controller>();
     shotCreator    = GameObject.FindGameObjectWithTag("ShotCreator").GetComponent <CreateShots>();
 }
 void Awake()
 {
     _instance = this;
 }