Пример #1
0
        /// <summary>
        /// Constructor of HealthSystem class
        /// </summary>
        /// <param name="mediator">Mediator used to communicate</param>
        public HealthSystem(Mediator mediator)
        {
            _mediator = mediator;

            /* 
             * Register this class to listen for all DamageEvent
             * This Event occurres each time a game object will get hurt
             */
            _mediator.RegisterListener(EventTypeConstant.DamageEvent, this);
        }
Пример #2
0
 /// <summary>
 /// Constructor of PoisonSystem class
 /// </summary>
 /// <param name="mediator">Mediator used to communicate</param>
 public PoisonSystem(Mediator mediator)
 {
     _mediator = mediator;
 }