Example #1
0
 public void AddObjs(IEnumerable <IGameObj> o)
 {
     foreach (IGameObj go in o)
     {
         NewObjs.Add(go);
     }
 }
Example #2
0
        private void UpdateObjects()
        {
            foreach (IGameObj o in DeadObjs)
            {
                o.Die(this);
                Objs.Remove(o);
            }
            DeadObjs.Clear();

            foreach (IGameObj o in NewObjs)
            {
                Objs.Add(o);
            }
            NewObjs.Clear();
        }
Example #3
0
 // Crap, when must this happen?
 // It can happen whenever Objs is the current state... which is thoretically always.
 // This will nuke the particles though.
 // This is actually pretty close to correct.
 public void SetLevel(int level)
 {
     UpdateObjects();
     Objs.Remove(Player);
     Levels[CurrentLevel].Objs = Objs;
     // This is PROBABLY right, but I'm not sure.
     CurrentLevel = level;
     Objs         = Levels[CurrentLevel].Objs;
     Objs.Add(Player);
     NewObjs.Clear();
     DeadObjs.Clear();
     Particles.Clear();
     NewParticles.Clear();
     DeadParticles.Clear();
     UpdateCollisionTree();
 }
Example #4
0
 public void AddObj(IGameObj o)
 {
     NewObjs.Add(o);
 }