revamp of damage notifs; added Explodes

This commit is contained in:
Chris Forbes
2009-12-19 10:42:35 +13:00
parent 10431a5038
commit 07b5b4c164
16 changed files with 128 additions and 60 deletions

View File

@@ -0,0 +1,23 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using OpenRa.Game.Effects;
namespace OpenRa.Game.Traits
{
class Explodes : INotifyDamage
{
public Explodes(Actor self) {}
public void Damaged(Actor self, AttackInfo e)
{
if (self.IsDead)
{
Game.world.AddFrameEndTask(
w => w.Add(new Bullet("UnitExplode", e.Attacker.Owner, e.Attacker,
self.CenterLocation.ToInt2(), self.CenterLocation.ToInt2())));
}
}
}
}