// Start is called before the first frame update void Start() { controller = (ShootingSceneController)FindObjectOfType(typeof(ShootingSceneController)); score = GetComponent <Text>(); scoreValue = controller.GetScore(); fixedText = score.text; }
void Start() { player = GameObject.FindGameObjectWithTag("Player").transform; target = new Vector2(player.position.x, player.position.y); controller = (ShootingSceneController)FindObjectOfType(typeof(ShootingSceneController)); }
virtual protected void Init() { controller = (ShootingSceneController)FindObjectOfType(typeof(ShootingSceneController)); }
void Start() { controller = (ShootingSceneController)FindObjectOfType(typeof(ShootingSceneController)); }
// Start is called before the first frame update void Start() { rb = GetComponent <Rigidbody2D>(); controller = (ShootingSceneController)FindObjectOfType(typeof(ShootingSceneController)); timeToAttack = Random.Range(0f, attackTimer); }