XMLData class added. This will manage the saving and loading of all scripted objects during runtime. The saved files will be XML formatted.
Added rScript files to the engine. These have not been implemented and currently don't work with the engine. BaseScript has been modified to support the new XMLData class for saving data.
This commit is contained in:
parent
fc27d9fc22
commit
38bdf75bf1
16 changed files with 1174 additions and 25 deletions
54
MudEngine/WinPC_Engine/Scripting/ScriptEnumerator.cs
Normal file
54
MudEngine/WinPC_Engine/Scripting/ScriptEnumerator.cs
Normal file
|
@ -0,0 +1,54 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
using MudEngine.GameScripts;
|
||||
using MudEngine.Core;
|
||||
|
||||
namespace MudEngine.Scripting
|
||||
{
|
||||
internal class ScriptEnumerator : IEnumerator<BaseScript>
|
||||
{
|
||||
public ScriptEnumerator(ObjectCollection objectManager)
|
||||
{
|
||||
this._ObjectCollection = objectManager;
|
||||
}
|
||||
|
||||
public void Reset()
|
||||
{
|
||||
this._currentIndex = -1;
|
||||
}
|
||||
|
||||
public BaseScript Current
|
||||
{
|
||||
get
|
||||
{
|
||||
if (this._currentIndex < 0)
|
||||
return null;
|
||||
else if (this._currentIndex > this._ObjectCollection.Length)
|
||||
return null;
|
||||
else
|
||||
return this._ObjectCollection[this._currentIndex];
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
object System.Collections.IEnumerator.Current
|
||||
{
|
||||
get { throw new NotImplementedException(); }
|
||||
}
|
||||
|
||||
public bool MoveNext()
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private Int32 _currentIndex = -1;
|
||||
private ObjectCollection _ObjectCollection;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue