示例#1
0
 public Options(ContentManager content,BarFight parent)
 {
     this.parent = parent;
     Texture2D AA,resolution,rumble,sfx,music,fullscreen,accept,exit;
     AA = content.Load<Texture2D>("antialiasing");
     resolution = content.Load<Texture2D>("resolution");
     rumble = content.Load<Texture2D>("rumble");
     sfx = content.Load<Texture2D>("soundfx");
     music = content.Load<Texture2D>("music");
     fullscreen = content.Load<Texture2D>("fullscreen");
     accept = content.Load<Texture2D>("start");
     exit = content.Load<Texture2D>("exit");
     x = parent.ScreenWidth / 2 - (AA.Width / 2);
     y = parent.ScreenHeight / 2 - ((4 + AA.Height * 5) / 2);
     width = AA.Width;
     height = AA.Height;
     menu = new Menu(4, new Rectangle(x, y, width, height), AA, resolution, rumble, sfx, music,fullscreen,accept,exit);
     settings = new Settings();
     settings.AA = true;
     settings.height = screenResos[0][1];
     settings.width = screenResos[0][0];
     settings.music = true;
     settings.rumble = true;
     settings.sfx = true;
     font = content.Load<SpriteFont>("Font");
     message = "";
 }
示例#2
0
 /// <summary>
 /// The main entry point for the application.
 /// </summary>
 static void Main(string[] args)
 {
     using (BarFight game = new BarFight())
     {
         game.Run();
     }
 }
 public PlayerSelector(ContentManager content,BarFight parent)
 {
     this.parent = parent;
     left = content.Load<Texture2D>("Left");
     right = content.Load<Texture2D>("Right");
     Texture2D go, exit;
     go = content.Load<Texture2D>("Start");
     exit = content.Load <Texture2D>("Exit");
     menu = new Menu(4, new Rectangle(parent.ScreenWidth / 2 - (go.Width / 2), parent.ScreenHeight / 2, go.Width, go.Height), go, exit);
     font = content.Load<SpriteFont>("Font");
     timer = InputDelay;
     numOfPlayers = MinNumOfPlayers;
 }
示例#4
0
 public Combatant(BarFight 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;
 }
示例#5
0
        public Room(GraphicsDevice device, BarFight parent)
        {
            //init model keys
            models = new Dictionary<string, BFModel>();

            //init music
            music = null;

            //init view and projection matrixes

            view = Matrix.CreateLookAt(new Vector3(0, 5, 5), Vector3.Zero, Vector3.UnitY);
            projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, device.Viewport.AspectRatio, 0.2f, 1000);

            //init the light
            lightPos = new Vector3();

            //set up parts list
            parts = new List<RefModel>();

            combatants = new List<Combatant>();
            hud = new HUD(parent.Content,parent.ScreenWidth,parent.ScreenHeight);

            drinks = new List<DrinkSpawner>();
            font = parent.Content.Load<SpriteFont>("Font");
            this.parent = parent;
        }
示例#6
0
 public Credits(ContentManager content,BarFight parent)
 {
     font = content.Load<SpriteFont>("Font");
     this.parent = parent;
     credits = content.Load<Texture2D>("creditsImage");
 }
 public LevelSelection(BarFight parent)
 {
     levelData = new LinkedList<LevelData>();
     this.parent = parent;
 }