// Use this for initialization void Awake() { gp = GameObject.Find("Points").GetComponent <GestionPuntos>(); spawn = GameObject.Find("SpawnEnemyCore").GetComponent <SpawnEnemyScript>(); anim = gameObject.GetComponent <Animator>(); bullet4 = GameObject.Find("Bullet4").GetComponent <Bullet4>(); points4 = gameObject.GetComponent <Text>(); }
void Start() { gp = GameObject.Find("Points").GetComponent <GestionPuntos>(); bullet1 = GameObject.Find("Bullet1").GetComponent <Bullet1>(); bullet2 = GameObject.Find("Bullet2").GetComponent <Bullet2>(); bullet3 = GameObject.Find("Bullet3").GetComponent <Bullet3>(); bullet4 = GameObject.Find("Bullet4").GetComponent <Bullet4>(); SpawnEnemyCore = GameObject.Find("SpawnEnemyCore").GetComponent <SpawnEnemyScript>(); playerObjectiu = Random.Range(1, 4); // esta chapat a 1 per fer probes, haura de ser un 4 FindAllPlayers(); vida = 1; tempo = 5; rendContent.enabled = false; rendNormal.enabled = true; }