Originally Posted by: Benjamin Nitschke 
Maybe Heiko can talk more about the level editor here since he wrote it
Like Benjamin wrote, the editor is currently very Soulcraft specific.
The best we could do is strip it of all specific code, and make a generic-base editor out of it,
which supports things like placing meshes, entities, actors etc.
Any special game logic would need to be added by the specific game team.
Special game code in Soulcraft are for example path-node editing abilities and
collision mesh setup.
The editor itself is quite dynamic in its support for game-specific entites.
For your own game you would just have to replace the Soulcraft Base entitiy (BaseEntity),
with the Basic game object of your game and set up some Properties/Attributes inside those classes.
(Similar to using the WinForms Property Grid)
Example code.
Code:
// Show Dialog with all existing entities (derived from BaseEntity)
AddEntityWithDialog(typeof(BaseEntity));
// Show Dialog with all entities deriving from BaseTrigger (->Shows available Triggers to choose from)
AddEntityWithDialog(typeof(BaseTrigger));
// Show Dialog with all entities deriving from BaseEnemy (->Shows available Enemies)
AddEntityWithDialog(typeof(BaseEnemy));
// Example Setup for Position Property, which shows up and is editable in editor afterwards
[Browsable(true)]
[Category("General")]
[Description("Position of entity in world space")]
public Vector Position
{
get;
set;
}
We will discuss how we strip down the editor and make it into an extensible generic base editor.
Stay tuned^^
-Heiko
Edited by user Tuesday, September 13, 2011 1:06:19 PM(UTC)
| Reason: Not specified