Esempio n. 1
0
 public Combatant(Game1 parent,Room room)
     : base()
 {
     leftFist = new AABB(0, 0, 0, 0.5f, 0.5f, 0.5f);
     rightFist = new AABB(0,0,0, 0.5f, 0.5f, 0.5f);
     hp = 100;
     drunkBuffer = 0;
     this.parent = parent;
     punch1 = parent.Content.Load<SoundEffect>("punch1").CreateInstance();
     punch2 = parent.Content.Load<SoundEffect>("punch2").CreateInstance();
     punch3 = parent.Content.Load<SoundEffect>("punch3").CreateInstance();
     punch4 = parent.Content.Load<SoundEffect>("punch4").CreateInstance();
     punch1.IsLooped = punch2.IsLooped = punch3.IsLooped = punch4.IsLooped = false;
     disconnected = -1;
     Combatant.room = room;
 }
Esempio n. 2
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            shader = new Shader(Content);

            //load the font
            font = Content.Load<SpriteFont>("font");

            room = new Room(GraphicsDevice, this);
            Texture2D texture1, texture2,texture3,texture4,texture5;
            texture1 = Content.Load<Texture2D>("Start");
            texture2 = Content.Load<Texture2D>("Exit");
            texture3 = Content.Load<Texture2D>("credits");
            texture4 = Content.Load<Texture2D>("controls");
            texture5 = Content.Load<Texture2D>("options");

            state = GameState.MainMenu;
            MainMenu = new Menu(4, new Rectangle(screenWidth / 2 - (texture1.Width / 2), screenHeight / 2 - (texture1.Height / 2), texture1.Width, texture2.Height), texture1, texture2,texture3,texture4,texture5);
            selector = new LevelSelection(this);
            characterSelector = new CharacterSelection( this, GraphicsDevice);
            playerSelector = new PlayerSelector(Content, this);

            mainBack = Content.Load<Texture2D>("Barback");

            //load the background music
            backMusic = Content.Load<SoundEffect>("BARFIGHT").CreateInstance();
            backMusic.IsLooped = true;
            backMusic.Play();
            credits = new Credits(Content, this);
            controls = new Controls(Content, this);
            options = new Options(Content, this);
            //loadRoom("Files/Rooms/room1.txt");
        }