public Burns(Actor self, BurnsInfo info) { Info = info; var rs = self.Trait<RenderSimple>(); var anim = new Animation("fire", () => 0); anim.PlayRepeating(Info.Anim); rs.anims.Add("fire", new AnimationWithOffset(anim, wr => new float2(0, -3), null)); }
public Burns(Actor self, BurnsInfo info) { Info = info; var anim = new Animation("fire", () => 0); anim.PlayRepeating(Info.Anim); self.Trait <RenderSprites>().anims.Add("fire", anim); }
public Burns(Actor self, BurnsInfo info) { Info = info; var anim = new Animation(self.World, "fire", () => 0); anim.IsDecoration = true; anim.PlayRepeating(Info.Anim); self.Trait <RenderSprites>().Add("fire", anim); }