Corrected error causing CommandEngine commands to not work.
This commit is contained in:
parent
7bc89b294b
commit
974cc0f9b8
3 changed files with 13 additions and 1 deletions
|
@ -149,7 +149,12 @@ namespace MudEngine.GameManagement
|
|||
|
||||
foreach (Type t in commandLibrary.GetTypes())
|
||||
{
|
||||
if (t.GetInterface(typeof(IGameCommand).FullName) != null)
|
||||
if (t.IsAbstract)
|
||||
continue;
|
||||
|
||||
Type inter = t.GetInterface("IGameCommand");
|
||||
|
||||
if (inter != null)
|
||||
{
|
||||
//Use activator to create an instance
|
||||
IGameCommand command = (IGameCommand)Activator.CreateInstance(t);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue