示例#1
0
        public Location LoadInn()
        {
            Location returnData;


            returnData             = new Location();
            returnData.Name        = "Prancing Pony";
            returnData.Description = "You belly up to the bar!";

            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            LocationAction locationAction = new RumorAction("Bartender", this.InnKeepersRumors);

            locationActions.Add(locationAction);

            //Adding rumors from guest in the inn
            LocationAction guestLocationAction = new RumorAction("Guest", this.InnGuestRumors);

            locationActions.Add(guestLocationAction);

            locationAction = new RestAction(5);
            locationActions.Add(locationAction);

            locationAction = new BuyTravelRation();
            locationActions.Add(locationAction);

            locationAction = new SaveAction();
            locationActions.Add(locationAction);

            locationAction = new MainMenuAction();
            locationActions.Add(locationAction);

            locationAction = new ExitGame();
            locationActions.Add(locationAction);

            returnData.Actions = locationActions;

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            LocationDefinition locationDefinition = GetTownCenterDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }
示例#2
0
        public Location LoadInn()
        {
            Location returnData;


            returnData             = new Location();
            returnData.Name        = "Beach Tower Inn";
            returnData.Description = "You belly up to the bar!";

            // Location Actions
            List <LocationAction> locationActions = new List <LocationAction>();

            LocationAction locationAction;

            locationAction = new RestAction(100);
            locationActions.Add(locationAction);

            locationAction = new BuyTravelRation();
            locationActions.Add(locationAction);

            locationAction = new SaveAction();
            locationActions.Add(locationAction);

            locationAction = new MainMenuAction();
            locationActions.Add(locationAction);

            locationAction = new ExitGame();
            locationActions.Add(locationAction);

            returnData.Actions = locationActions;

            // Adjacent Locations
            Dictionary <string, LocationDefinition> adjacentLocationDefinitions = new Dictionary <string, LocationDefinition>();

            LocationDefinition locationDefinition = GetTownCenterDefinition();

            adjacentLocationDefinitions.Add(locationDefinition.LocationKey, locationDefinition);

            returnData.AdjacentLocationDefinitions = adjacentLocationDefinitions;

            return(returnData);
        }