Esempio n. 1
0
        private async Task loadRooms(IGame game)
        {
            Debug.WriteLine("Startup: Loading Rooms");
            EmptyStreet emptyStreet = new EmptyStreet(game.State.Player);

            Rooms.EmptyStreet = emptyStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.EmptyStreet);

            Debug.WriteLine("Startup: Loaded empty street");

            BrokenCurbStreet brokenCurbStreet = new BrokenCurbStreet();

            Rooms.BrokenCurbStreet = brokenCurbStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.BrokenCurbStreet);

            Debug.WriteLine("Startup: Loaded broken curb street");

            TrashcanStreet trashcanStreet = new TrashcanStreet();

            Rooms.TrashcanStreet = trashcanStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.TrashcanStreet);

            Debug.WriteLine("Startup: Loaded trashcan street");

            DarsStreet darsStreet = new DarsStreet();

            Rooms.DarsStreet = darsStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.DarsStreet);

            Debug.WriteLine("Startup: Loaded Dars street");

            Rooms.Init(game);
            Debug.WriteLine("Startup: Initialized rooms");
        }
Esempio n. 2
0
		private static async Task loadRooms(IGame game)
		{
			AGSSplashScreen splashScreen = new AGSSplashScreen ();
			Rooms.SplashScreen = splashScreen.Load (game);
			game.State.Rooms.Add (Rooms.SplashScreen);
            Debug.WriteLine("Startup: Loaded splash screen");

			EmptyStreet emptyStreet = new EmptyStreet (game.State.Player);
			Rooms.EmptyStreet = emptyStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.EmptyStreet);
			//addRoomWhenLoaded(game, Rooms.EmptyStreet);
            Debug.WriteLine("Startup: Loaded empty street");

			BrokenCurbStreet brokenCurbStreet = new BrokenCurbStreet();
			Rooms.BrokenCurbStreet = brokenCurbStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.BrokenCurbStreet);
			//addRoomWhenLoaded(game, Rooms.BrokenCurbStreet);
            Debug.WriteLine("Startup: Loaded broken curb street");

			TrashcanStreet trashcanStreet = new TrashcanStreet();
			Rooms.TrashcanStreet = trashcanStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.TrashcanStreet);
			//addRoomWhenLoaded (game, Rooms.TrashcanStreet);
            Debug.WriteLine("Startup: Loaded trashcan street");

			DarsStreet darsStreet = new DarsStreet();
			Rooms.DarsStreet = darsStreet.LoadAsync(game);
            await waitForRoom(game, Rooms.DarsStreet);
			//addRoomWhenLoaded(game, Rooms.DarsStreet);
            Debug.WriteLine("Startup: Loaded Dars street");

			Rooms.Init(game);
            Debug.WriteLine("Startup: Initialized rooms");

			//await Rooms.DarsStreet;
		}