//initialise scripts into variables void Start() { dead = false; playerController = GameObject.FindObjectOfType <PlayerController>(); powerupController = GameObject.FindObjectOfType <PowerupController> (); enemyController = gameObject.GetComponent <EnemyController> (); sideEnemyController = gameObject.GetComponent <SideEnemyController> (); particleEnemyController = gameObject.GetComponent <ParticleEnemyController> (); missileSeek = gameObject.GetComponent <MissileSeek> (); }
public SideEnemyController sec; //associated script //initialisation void Start() { sec = GetComponentInParent <SideEnemyController> (); }