void Start() { enemigo = GameObject.FindGameObjectWithTag("Enemigo"); _penemigo = enemigo.GetComponent <Pausaenemigo>(); musiclevel = GetComponent <AudioSource>(); musiclevel.Play(); }
// Start is called before the first frame update void Start() { ps = this; Init(); Manager._manager.pausa += OnPauseGame; Manager._manager.reanudar += OnResumeGame; Manager._manager.suscribir += Suscribir; Manager._manager.desuscribir += Desuscribir; }
// Start is called before the first frame update protected void Init() { controller = GetComponent <Controller2D> (); anim = GetComponent <Animator>(); boxCollider = GetComponent <BoxCollider2D>(); Player = GameObject.FindGameObjectWithTag("Player"); player = Player.GetComponent <Player>(); playerStates = Player.GetComponent <PlayerStates>(); velocidadenemigo = GetComponent <Velocidadenemigo>(); pausar = GetComponent <Pausaenemigo>(); }