Esempio n. 1
0
        public void OnDisplayDamage(IDoomEvent displayDamageEvent)
        {
            var evt = (DamageEvent) displayDamageEvent;
            float yOffset = evt.DamagedActor.Height + DamageFont.MeasureString(evt.Damage.ToString()).Y;
            var floatingText = new TimedText(evt.Damage.ToString(), evt.DamagedActor.Position + new Vector3(0, yOffset, 0), DamageFont, 1500, 1, Color.Red, Color.Black);
            FloatingTexts.Add(floatingText);

            Log.Debug("Actor " + evt.DamagedActor.ActorId + " took " + evt.Damage + " damage.");
        }
Esempio n. 2
0
 public TextEvent(DoomEventType eventType, TimedText text, params string[] listenerNames)
 {
     _eventType = eventType;
     _text = text;
     _listenerNames = listenerNames;
 }