aboutsummaryrefslogtreecommitdiff
path: root/SuperPolarity/Renderer.cs
blob: 6dfa642026bb027f351db3b1b324e6546b0ef455 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Graphics;

namespace SuperPolarity
{
    class Renderer
    {
        
        static List<Actor> Actors;

        static Renderer()
        {
            Actors = new List<Actor>();
        }

        static public void CheckIn(Actor actor)
        {
            Actors.Add(actor);
        }

        static public void CheckOut(Actor actor)
        {
            Actors.Remove(actor);
        }

        static public void Draw(SpriteBatch spriteBatch)
        {
            foreach (Actor actor in Actors)
            {
                actor.Draw(spriteBatch);
            }
        }

        static public void Empty()
        {
            Actors.Clear();
        }
    }
}