public void FireNotifycation(ILogicNotifycation notify) { lock (handlerList) { foreach (ILogicNotifycationHandler handler in handlerList) { handler.Handle(notify); } } }
void ILogicNotifycationHandler.Handle(ILogicNotifycation notify) { if (notify is AttackEvent) { AttackEvent eventArgs = (AttackEvent)notify; Sprite sprite = (GuiImage)"[email protected]?208-213"; sprite.Animation.Speed = 10; view.Particles.Add(new StaticAnimationParticle(sprite, eventArgs.Attacker)); view.Particles.Add(new StaticAnimationParticle(sprite.Clone(), eventArgs.Defender)); } }