Beispiel #1
0
        /// <summary>Creates the first room</summary>
        /// <param name="h">The user's character</param>
        private void MakeRoomOne(Human h)
        {
            _roomOneWalls = RoomOne.MakeRoomOne(h, _height, _width, _locations,
                                                _roomOneWalls, _fileName);
            _fileName = "RoomOneMap.txt";
            //Sets the start point
            _userLocation = new Point(5, 0);

            _height    = 10;
            _width     = 16;
            _locations = SetUpLocations(_locations);

            SetInaccessibleWalls(_roomOneWalls);

            //Sets spawns for the enemies
            _locations[6, 1]  = new Enemy(Globals.UserLevel, new Point(6, 1));
            _locations[6, 4]  = new Enemy(Globals.UserLevel, new Point(6, 4));
            _locations[2, 7]  = new Enemy(Globals.UserLevel, new Point(2, 7));
            _locations[10, 7] = new Enemy(Globals.UserLevel, new Point(10, 7), "Sergeant");
            _locations[14, 8] = new Enemy(Globals.UserLevel, new Point(14, 8));
            //sets spawns for the treasures
            _locations[3, 3] = new Barrel(new Point(3, 3));
            _locations[5, 8] = new Barrel(new Point(5, 8));
            _locations[1, 8] = new Chest(new Point(1, 8));

            _exit = new Point(11, 6);
        }
Beispiel #2
0
        //PlayerStats player = new PlayerStats();
        //SubBoss boss = new SubBoss();

        //roomNavigations
        public void NavRoomOne()
        {
            Console.Clear();
            RoomOne firstRoom = new RoomOne();

            while (roomOne)
            {
                Console.WriteLine(firstRoom.RoomDescription);
                Console.WriteLine("1. Go to door on left.\n" +
                                  "2. Go to door on right\n" +
                                  "3. Go to door straight ahead\n" +
                                  "4. Search Room");

                string input = Console.ReadLine();

                switch (input)
                {
                case "1":
                    roomOne = false;
                    roomTwo = true;
                    NavRoomTwo();
                    break;

                case "2":
                    roomOne   = false;
                    roomThree = true;
                    NavRoomThree();
                    break;

                case "3":
                    Exit();
                    break;

                case "4":
                    roomOneSearch();
                    break;

                default:
                    Console.WriteLine("Not a valid input");
                    break;
                }
            }
        }
 // Start is called before the first frame update
 void Start()
 {
     manager = player.GetComponent <RoomOne>();
 }