From f8aec187ea7dc410a32996406109f290f3199ffa Mon Sep 17 00:00:00 2001 From: Ben Beltran Date: Mon, 11 Nov 2013 20:39:35 -0600 Subject: Moves to ActorManager arch + Actor Inherited stuff --- Super Polarity/ActorManager.cs | 45 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 Super Polarity/ActorManager.cs (limited to 'Super Polarity/ActorManager.cs') diff --git a/Super Polarity/ActorManager.cs b/Super Polarity/ActorManager.cs new file mode 100644 index 0000000..bca7168 --- /dev/null +++ b/Super Polarity/ActorManager.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; + +namespace SuperPolarity +{ + static class ActorManager + { + static List Actors; + + static ActorManager() + { + Actors = new List(); + } + + static public void CheckIn(Actor actor) + { + Actors.Add(actor); + } + + static public void CheckOut(Actor actor) + { + Actors.Remove(actor); + } + + static public void Update(GameTime gameTime) + { + foreach (Actor actor in Actors) + { + actor.Update(gameTime); + } + } + + static public void Draw(SpriteBatch spriteBatch) + { + foreach (Actor actor in Actors) + { + actor.Draw(spriteBatch); + } + } + } +} -- cgit