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); }
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); }
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>(); }
void Start() { GameEventListener gameOverListener = (GameEventListener)ScriptableObject.CreateInstance("GameEventListener"); gameOverListener.SetupListener(gameOverEvent, GameOver); }