Esempio n. 1
0
        public World(int width, int height)
        {
            generator = new TerrainGenerator(this);

            Player = new Player(this, new Vector2(50, 50));
            this.width = width;
            this.height = height;
            Failed = false;

            //camera = new Camera(Player, Width, Height, DEFAULT_ZOOM_LEVEL);
        }
Esempio n. 2
0
 public void Remove(GameObject gameObject)
 {
     if (gameObject is Player)
         Player = null;
     else if (gameObject as Laser != null)
         Lasers.BufferRemove((Laser)gameObject);
     else if (gameObject as Zombie != null)
         Zombies.BufferRemove((Zombie)gameObject);
     else if (gameObject as Vampire != null)
         Vampires.BufferRemove((Vampire)gameObject);
     else if (gameObject as Block != null)
         Blocks.BufferRemove((Block)gameObject);
     else
         throw new InvalidOperationException("Unhandled removal of object.");
 }