Esempio n. 1
0
 public Doorway(LevelManager manager, Point pos, Level linkedlevel, Point newPlayerPos)
 {
     this.manager = manager;
     linked = linkedlevel;
     playerPos = newPlayerPos;
     base.LoadContent(manager, "doorway", pos);
 }
Esempio n. 2
0
        public Wave(LevelManager manager, string path, Point pos, float initialAngle)
        {
            angle = initialAngle;

            base.LoadContent(manager, path, pos);

            initialX = rectangle.X;
            initialY = rectangle.Y;
        }
Esempio n. 3
0
 /// <summary>
 /// Load necessary content. A call to this must be made from all objects.
 /// </summary>
 /// <param name="manager">Instance of LevelManager class being used.</param>
 /// <param name="texPath">Path of initial object texture.</param>
 /// <param name="pos">Position of object.</param>
 public void LoadContent(LevelManager manager, String texPath, Point pos)
 {
     this.manager = manager;
     ChangeTex(texPath);
     rectangle = new Rectangle(pos.X - texture.Width / 2, pos.Y - texture.Height / 2, texture.Width, texture.Height);
 }
Esempio n. 4
0
 /// <summary>
 /// LoadContent will be called once per game and is the place to load
 /// all of your content.
 /// </summary>
 protected override void LoadContent()
 {
     spriteBatch = new SpriteBatch(GraphicsDevice);
     System.Diagnostics.Debug.WriteLine("Width:" + GraphicsDevice.Viewport.Width + " Height:" + GraphicsDevice.Viewport.Height + " AspectRatio:" + GraphicsDevice.Viewport.AspectRatio);
     player = new Player(this, Point.Zero, Content.Load<Texture2D>("Sprites/player"));
     manager = new LevelManager(Content, this);
     graphics.ToggleFullScreen();
     System.Diagnostics.Debug.WriteLine("Width:" + GraphicsDevice.Viewport.Width + " Height:" + GraphicsDevice.Viewport.Height + " AspectRatio:" + GraphicsDevice.Viewport.AspectRatio);
     graphics.PreferredBackBufferWidth = 640;
     graphics.PreferredBackBufferHeight = 480;
     graphics.ApplyChanges();
     System.Diagnostics.Debug.WriteLine("Width:" + GraphicsDevice.Viewport.Width + " Height:" + GraphicsDevice.Viewport.Height + " AspectRatio:" + GraphicsDevice.Viewport.AspectRatio);
     ChangeLevel(manager.ship_2, new Point(48, 30));
 }
Esempio n. 5
0
 public Door(LevelManager manager, Point pos, bool open)
 {
     this.open = open;
     SetSolid(!open);
     base.LoadContent(manager, GetTexture(), pos);
 }
Esempio n. 6
0
 public Button(LevelManager manager, GameObject t, Point pos)
 {
     trigger = t;
     base.LoadContent(manager, "button", pos);
 }