mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-26 00:45:20 +00:00
moved the particle system and the entity component system into their own nuget packages
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
using System.Linq;
|
||||
using Microsoft.Xna.Framework;
|
||||
using MonoGame.Extended.Entities.Components;
|
||||
using MonoGame.Extended.Sprites;
|
||||
|
||||
namespace MonoGame.Extended.Entities.Systems
|
||||
{
|
||||
public class AnimatedSpriteSystem : ComponentSystem
|
||||
{
|
||||
public override void Update(GameTime gameTime)
|
||||
{
|
||||
var deltaTime = gameTime.GetElapsedSeconds();
|
||||
var sprites = GetComponents<TransformableComponent<Sprite>>();
|
||||
|
||||
foreach (var animatedSprite in sprites.Select(c => c.Target).OfType<AnimatedSprite>())
|
||||
animatedSprite.Update(deltaTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user