Ejemplo n.º 1
0
    void Start()
    {
        score = 0;

        enemyDeathListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");
        enemyDeathListener.SetupListener(enemyDeathEvent, IncreaseScore);
    }
    void Start()
    {
        hp = maxHealth;
        healthBar.GetComponent <Slider>().value = hp;

        GameEventListener computerAttackListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        computerAttackListener.SetupListener(computerAttackEvent, TakeDamage);
    }
Ejemplo n.º 3
0
    void Start()
    {
        GameEventListener gameOverListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        gameOverListener.SetupListener(gameOverEvent, GameOver);
        GameEventListener pauseEventListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        pauseEventListener.SetupListener(pauseEvent, Pause);
        GameEventListener unpauseEventListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        unpauseEventListener.SetupListener(unpauseEvent, Unpause);
    }
Ejemplo n.º 4
0
    void Start()
    {
        enemyAnimator.SetBool("Walk", true);

        GameEventListener gameOverListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        gameOverListener.SetupListener(gameOverEvent, GameOver);
        GameEventListener pauseEventListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        pauseEventListener.SetupListener(pauseEvent, Pause);
        GameEventListener unpauseEventListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        unpauseEventListener.SetupListener(unpauseEvent, Unpause);

        rb = gameObject.GetComponent <Rigidbody2D>();
    }
Ejemplo n.º 5
0
    void Start()
    {
        GameEventListener gameOverListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener");

        gameOverListener.SetupListener(gameOverEvent, GameOver);
    }