Mud Designer:
- Removed from solution Mud Engine: - Moved the CommandEngine, CommandResults and ICommand Interface out from the Commands namespace and into GameManagement since they manage the game commands. - Added CommandExit class to provide the ability to exit a game once running. This is fully implemented. - Realms, Zones and Rooms now have an IsInitial property for determining if this is an initial location for the Game. - Renamed GameSetup to Game. - Corrected GameObject being in the incorrect namespace. - Corrected the ScriptEngine not - CommandEngine no longer needs a Name argument. Arguments changed from 5 to 4 due to this change. Mud Game: - Added Example Game used for testing various MUDEngine features and testing constructability of games using the engine. - Currently only contains 1 Realm, 1 Zone and Two Rooms. Only working command is Exit.
This commit is contained in:
parent
06266b7245
commit
b8f6be12c0
16 changed files with 374 additions and 40 deletions
25
MudEngine/Commands/CommandExit.cs
Normal file
25
MudEngine/Commands/CommandExit.cs
Normal file
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MudEngine.GameObjects.Characters;
|
||||
using MudEngine.GameManagement;
|
||||
using MudEngine.Commands;
|
||||
using MudEngine.GameObjects.Environment;
|
||||
|
||||
namespace MudEngine.Commands
|
||||
{
|
||||
public class CommandExit : IGameCommand
|
||||
{
|
||||
public bool Override { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
public CommandResults Execute(string command, BaseCharacter player, Game game, Room room)
|
||||
{
|
||||
game.IsRunning = false;
|
||||
|
||||
return new CommandResults();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue