A DGDK.NET plugin can be written in any of the .NET supported languages. C++, VB.net, C#.net.
Typically, this is what a CSharp class file would look like for your Class Library project:
using System;
using System.Collections.Generic;
using System.Text;
namespace CSharpPlugin
{
public class CPlugin
{
private CDGDKGlobals m_oGlobals;
public CPlugin( CDGDKGlobals oGlobals )
{
m_oGlobals = oGlobals;
}
public void TestMe()
{
m_oGlobals.m_pDGDKBasic3D.MakeObjectCube(1, 100);
}
}
}
Your class library project must also reference the DGDKPlugins.dll file. (Ignore the DGDKPlugin.dll file that is currently found in the 1.0.5.0 version of DGDK.NET, I have removed this file in the next update)
Once you have created your plugin DLL file, all you need to do is reference your Plugin.DLL file in your normal applications. Your application should have both dgdkGlobals.cs and dgdkPlugins.cs added so that you can use your Plugin.DLL file. Here is how I would use it in a CSharp project:
Imports CSharpPlugin
Module CPluginDemo
Dim oCSharpPlugin As New CPlugin(GetDGDKGlobals())
Sub Main()
If Not InitializeDGDK("") Then End
oDBCore.SyncOn()
oDBCore.SyncRate(60)
oDBCamera.AutoCamOff()
oDBCamera.PositionCamera(0, 150, 0)
oCSharpPlugin.TestMe()
While oDBP.LoopGDK
oDBCamera.ControlCameraUsingArrowKeys(0, 5.0F, 3.0F)
oDBCore.Sync()
End While
oCSharpPlugin.Dispose()
End Sub
End Module
Hope this clears things up a little.
Paul.