MudEngine:
- All Objects now dynamically create their Filenames after the BaseObject.Name has been set. You can re-specify a custom filename, but do so after setting BaseObject.Name's value. - Added GameWorld.cs. This will manage the game world itself. - Moved Realm Initialization from Game.Start() into GameWorld.Start() - Moved Environment saving from Game.Save() to GameWorld.Save(). However, GameWorld.Save gets invoked from Game.Save() - GameWorld is now responsible for adding Realms to the Game. - Fixed ScriptEngine not using Both Scripts and Assemblies at the same time. - Added BaseAI which inherits from baseCharacter. All AI objects will inherit from this object. MudGame: - Modified MyGame.cs script for demonstrating the new way to create environments with the implementation of GameWorld. - Updated Program.cs to compile both Scripts and Assemblies at once.
This commit is contained in:
parent
7a4c9211d4
commit
717034f9ed
9 changed files with 259 additions and 153 deletions
|
@ -16,37 +16,31 @@ public class MyGame : Game
|
|||
myRealm.Name = "California";
|
||||
myRealm.Description = "The Beaches of California are relaxing and fun to be at.";
|
||||
myRealm.IsInitialRealm = true;
|
||||
|
||||
//Add the Realm to the Games RealmCollection
|
||||
AddRealm(myRealm);
|
||||
World.AddRealm(myRealm);
|
||||
|
||||
Zone myZone = new Zone(this);
|
||||
myZone.Name = "San Diego";
|
||||
myZone.Realm = myRealm.Name;
|
||||
myZone.Description = "San Diego has many attractions, including Sea World!";
|
||||
myZone.IsInitialZone = true;
|
||||
|
||||
//Add the Zone to the Realm
|
||||
myRealm.AddZone(myZone);
|
||||
|
||||
//Create our HotelRoom
|
||||
Room myRoom = new Room(this);
|
||||
myRoom.Name = "Hotel Room B33";
|
||||
myRoom.IsInitialRoom = true;
|
||||
myZone.AddRoom(myRoom);
|
||||
myRoom.DetailedDescription.Add("Your Hotel Room is pretty clean, it is small but not to far off from the beach so you can't complain.");
|
||||
myRoom.DetailedDescription.Add("You can exit your Hotel Room by walking West");
|
||||
//Add the Hotel Room to the Zones Room Collection
|
||||
myZone.AddRoom(myRoom);
|
||||
|
||||
Room myHallway = new Room(this);
|
||||
myHallway.Name = "Hotel Hallway";
|
||||
myHallway.DetailedDescription.Add("The Hotel Hallway is fairly narrow, but there is plenty of room for people to traverse through it.");
|
||||
myHallway.DetailedDescription.Add("Your Hotel Room B33 is to the East.");
|
||||
myHallway.DetailedDescription.Add("Hotel Room B34 is to your West.");
|
||||
//Add the Hallway to the Zones Room Collection
|
||||
myZone.AddRoom(myHallway);
|
||||
|
||||
myZone.LinkRooms(AvailableTravelDirections.West, myHallway, myRoom);
|
||||
|
||||
|
||||
Room nextRoom = new Room(this);
|
||||
nextRoom.Name = "Hotel Room B34";
|
||||
nextRoom.DetailedDescription.Add("This Hotel Room is pretty dirty, they must not have cleaned it yet.");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue