Game Development Reference
In-Depth Information
n Reserving a space for the game engine to draw the game world and accept input,
such as mouse clicks or drags to move the view or modify actors.
n Displaying and managing a complete list of all available game assets, such as
textures, audio files, Lua scripts, and so on.
n Reading actor information from the game engine and sending any changes to
actor components back to the game engine.
n Displaying a complete list of all the actors in the current scene and allowing
them to be selected for modification.
n Displaying the components of the currently selected actor so it can be modified.
n Displaying a menu for opening levels, creating new components on selected
actors, and so on.
I
'
ll cover each of these areas in the next few sections.
public partial class EditorForm : Form
{
private string m_ProjectDirectory;
private string m_AssetsDirectory;
private string m_CurrentLevelFile;
private List<XmlNode> m_ActorsXmlNodes = new List<XmlNode>();
private int m_SelectedActorId = 0;
private MessageHandler m_messageFilter;
private ActorComponentEditor m_ActorComponentEditor;
public EditorForm()
{
var currentDirectory = Directory.GetCurrentDirectory();
var parentDirectory = Directory.GetParent(currentDirectory);
m_ProjectDirectory = parentDirectory.FullName;
m_AssetsDirectory = m_ProjectDirectory +
\\Assets
;
InitializeComponent();
try
{
// This is how we get the instance handle for our C# app.
System.IntPtr hInstance = Marshal.GetHINSTANCE(this.GetType().Module);
// This is how we get the window handle for
// the panel we
ll be rendering into.
IntPtr hwnd = this.DisplayPanel.Handle;
'
Search WWH ::




Custom Search