public RenderSprite(Actor self, RenderSpriteInfo info) { world = self.World; image = info.Animation ?? self.Info.Name; sequences = self.World.Game.Animations[image].Sequences; if (sequences.Length == 0) throw new MetadataException("Animation `{0}` has no sequences.".F(image)); CurrentSequence = sequences[0]; ticksPerFrame = CurrentSequence.TicksPerFrame; currentFrame = 0; ticks = ticksPerFrame; }
public RenderSprite(Actor self, RenderSpriteInfo info) { world = self.World; image = info.Animation ?? self.Info.Name; sequences = self.World.Game.Animations[image].Sequences; if (sequences.Length == 0) { throw new MetadataException("Animation `{0}` has no sequences.".F(image)); } CurrentSequence = sequences[0]; ticksPerFrame = CurrentSequence.TicksPerFrame; currentFrame = 0; ticks = ticksPerFrame; }