Example #1
0
 public void selectCave(int cn)
 {
     caveNumber = cn;                     // Set cave number
     _Cave      = new Cave(caveNumber);   // Instantiate Cave object
     _Trivia    = new Trivia(caveNumber); // Instantiate Trivia object
     _Map       = new Map(caveNumber);
     // Open new game
     _PlayGame = new PlayGame(this); // Make new PlayGame object
     _PlayGame.Show();
 }
Example #2
0
 public void beginGame()
 {
     gui   = new GUI();
     c     = new Cave();
     pc    = new PlayerControl();
     gl    = new GameLocations();
     h     = new Hazards();
     t     = new Trivia();
     hs    = new HighScore();
     turns = 0;
 }
Example #3
0
 public void selectCave(int cn)
 {
     caveNumber = cn; // Set cave number
     _Cave = new Cave(caveNumber); // Instantiate Cave object
     _Trivia = new Trivia(caveNumber); // Instantiate Trivia object
     _Map = new Map(caveNumber);
     // Open new game 
     _PlayGame = new PlayGame(this); // Make new PlayGame object
     _PlayGame.Show();
     
 }
Example #4
0
 public GameControl(Vector2 WindowSize)
 {
     // GState.Game loads the game
     // GState.Menu loads the menu
     GameState      = Gstate.Menu;
     MyWumpus       = new Wumpus(new Vector2(Room.RoomSize.Center.X - 200, Room.RoomSize.Center.Y - 200), "WumpusFiles\\Wumpus5_Small");
     MyTrivia       = new Trivia("Chemistry", new Vector2(), "Trivia\\backgroundTrivia");
     MyCave         = new Cave1("CaveFiles\\MapDataCave1.txt");
     MyPlayer       = new Player(new Vector2(WindowSize.X / 2, WindowSize.Y / 2), "Player\\Player5", 0, 10, 0, 0, 5f);
     MyMap          = new Map(MyCave.getTotalRooms());
     MySound        = new Sound();
     MyUI           = new GUI();
     GameDimensions = WindowSize;
 }
Example #5
0
        public GameControl(Vector2 WindowSize)
        {
            // GState.Game loads the game
            // GState.Menu loads the menu
            GameState = Gstate.Menu;
            MyWumpus = new Wumpus(new Vector2(Room.thisSize.Center.X - 35, Room.thisSize.Center.Y - 35), "Wumpus2_Small");
            MyTrivia = new Trivia("Chemistry");
            MyCave = new Cave1("C:\\Users\\" + username + "\\Dropbox\\WumpusTest\\WumpusTest\\WumpusTestContent\\CaveFiles\\MapDataCave1.txt");
            MyPlayer = new Player(new Vector2(WindowSize.X / 2, WindowSize.Y / 2), "Player\\Player5", 0, 10, 0, 0, 3.5f);
            MyMap = new Map(MyCave.getTotalChambers());
            MySound = new Sound();

            MyUI = new GUI();
            GameDimensions = WindowSize;
        }
Example #6
0
        public GameControl(Vector2 WindowSize)
        {
            // GState.Game loads the game
            // GState.Menu loads the menu
            GameState = Gstate.Menu;
            MyWumpus  = new Wumpus(new Vector2(Room.thisSize.Center.X - 35, Room.thisSize.Center.Y - 35), "Wumpus2_Small");
            MyTrivia  = new Trivia("Chemistry");
            MyCave    = new Cave1("C:\\Users\\" + username + "\\Dropbox\\WumpusTest\\WumpusTest\\WumpusTestContent\\CaveFiles\\MapDataCave1.txt");
            MyPlayer  = new Player(new Vector2(WindowSize.X / 2, WindowSize.Y / 2), "Player\\Player5", 0, 10, 0, 0, 3.5f);
            MyMap     = new Map(MyCave.getTotalChambers());
            MySound   = new Sound();

            MyUI           = new GUI();
            GameDimensions = WindowSize;
        }
        //resets all objects to initial states, takes the number of cave as parameter
        public void startGame(int cavenum)
        {
            //initializes fields
            map    = new Map(cavenum);
            render = new InGameRenderInfo();
            trivia = new Trivia();
            scores = new HighScore();
            player = new Player();
            reason = 0;
            loadFact();

            //loads cave pathways into render to be displayed
            render.CaveConnections = map.getConnections();
            //updates render to be displayed
            updateRender();
        }
Example #8
0
        public GameControl(Vector2 WindowSize)
        {
            // GState.Game loads the game
            // GState.Menu loads the menu
            GameState = Gstate.Menu;
            MyPlayer = new Player(new Vector2(WindowSize.X/2, WindowSize.Y/2), "Player\\Player2", 0, 10, 0, 0, 3.5f);
            MyMap = new Map();
            MyWumpus = new Wumpus(Vector2.Zero, "Wumpus2_Small");
            MyTrivia = new Trivia("Chemistry");
            //UNIVERSAL TEST:
            MyCave = new Cave1("C:\\Users\\" + username + "\\Dropbox\\WumpusTest\\WumpusTest\\WumpusTestContent\\CaveFiles\\MapDataCave1.txt");
            MySound = new Sound();

            MyUI = new GUI();
            GameDimensions = WindowSize;
        }
Example #9
0
        public GameControl(Vector2 WindowSize)
        {
            // GState.Game loads the game
            // GState.Menu loads the menu
            GameState = Gstate.Menu;
            MyPlayer  = new Player(new Vector2(WindowSize.X / 2, WindowSize.Y / 2), "Player\\Player2", 0, 10, 0, 0, 3.5f);
            MyMap     = new Map();
            MyWumpus  = new Wumpus(Vector2.Zero, "Wumpus2_Small");
            MyTrivia  = new Trivia("Chemistry");
            //UNIVERSAL TEST:
            MyCave  = new Cave1("C:\\Users\\" + username + "\\Dropbox\\WumpusTest\\WumpusTest\\WumpusTestContent\\CaveFiles\\MapDataCave1.txt");
            MySound = new Sound();

            MyUI           = new GUI();
            GameDimensions = WindowSize;
        }
Example #10
0
        public void EndAll()
        {
            Bg.Dispose();
            gold.Dispose();
            EncWumpus.Dispose();
            EncPit.Dispose();
            EnterRoom.Dispose();
            LeaveRoom.Dispose();
            Trivia.Dispose();
            ArrowShot.Dispose();
            Shoots.Dispose();
            highscore.Dispose();
            Menu.Dispose();
            bats.Dispose();

            Attack.Dispose();
        }
Example #11
0
 public TriviaUI(Trivia t, int indexofrightanswer)
 {
     InitializeComponent();
     this.indexofrightanswer = indexofrightanswer;
     trivia = t;
 }
Example #12
0
 public TriviaUI(Trivia t, int indexofrightanswer)
 {
     InitializeComponent();
     this.indexofrightanswer = indexofrightanswer;
     trivia = t;
 }