Example #1
0
 public virtual ItemEffect CreateEffect(Point position, Game game)
 {
     soundEffect.Play();
     var size = new Size(ImpactSize * 2);
     if (imageEffect == null)
         size.Width *= DrawArea.Size.AspectRatio;
     return new ItemEffect(imageEffect ?? Image, position, size, ImpactTime)
     {
         DoDamageEvery = DoDamageEvery,
         DoDamage = () => game.DoDamage(position, ImpactSize, Damage),
     };
 }