Actor.traits is implementation detail

This commit is contained in:
Bob
2010-08-14 15:19:30 +12:00
committed by alzeih
parent f6c6255f64
commit ae703d50b2
165 changed files with 586 additions and 561 deletions

View File

@@ -26,9 +26,9 @@ namespace OpenRA.Mods.RA
public WithMuzzleFlash(Actor self)
{
var attackInfo = self.Info.Traits.Get<AttackBaseInfo>();
var render = self.traits.Get<RenderSimple>();
var render = self.Trait<RenderSimple>();
muzzleFlash = new Animation(render.GetImage(self), () => self.traits.Get<IFacing>().Facing);
muzzleFlash = new Animation(render.GetImage(self), () => self.Trait<IFacing>().Facing);
muzzleFlash.Play("muzzle");
render.anims.Add("muzzle", new RenderSimple.AnimationWithOffset(