void Start()
    {
        enemigo   = GameObject.FindGameObjectWithTag("Enemigo");
        _penemigo = enemigo.GetComponent <Pausaenemigo>();

        musiclevel = GetComponent <AudioSource>();

        musiclevel.Play();
    }
Пример #2
0
    // 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;
    }
Пример #3
0
    // 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>();
    }