Exemplo n.º 1
0
        public Level(main main)
        {
            // should only be called by EditorLevel
            players = new List <Player>()
            {
                new Player(main.getSettings().getControlMode())
            };

            platforms = new List <Platform>()
            {
                new Platform(new Point(1000, 1000), 200),
                new Platform(new Point(1000, 800), 200)
            };

            foreach (Player p in players)
            {
                p.setLevel(this);
            }

            Sentry s = new Sentry(Sentry.Type.PUSH, 6);

            s.setPlatform(platforms.ElementAt(1));
            s.setLevel(this);

            sentries = new List <Sentry>()
            {
                s
            };

            this.animations = new List <Animation>();
            this.background = Render.initialBackground();
            this.camera     = new Camera(Camera.FollowMode.STEADY);
            this.main       = main;
        }
Exemplo n.º 2
0
 public void addSentry(Sentry sentry)
 {
     sentries.Add(sentry);
     sentry.setLevel(this);
 }