Hannes Rahm wrote:
Hello people!

I am developing a small multiplayer game in c# (using xna for graphics).
On the server side I am doing a lot of the logic programming in IronPython.

I have gotten to the point where I want to inherit from my "Entity" class defined in the hosting application source (c#) so I can specialize it for different purposes in IronPython.
I do not know how to accomplish this.

IronPython classes can inherit directly from C# classes. If this *isn't* achieving what you want could you provide some specific examples?

Thanks

Michael Foord

I have temporarily solved this by having a python wrapper class around the c# object (which I have to create using a CreateEntity() function in one of the global objects I pass in from "outside"). Alternatively I can add a public object ScriptingObject; that I can fill with what I want from python. But both these solutions seem a tad bit inelegant.

Does anyone have any ideas on how to do this?

Best regards
/Hannes
------------------------------------------------------------------------

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com


--
http://www.ironpythoninaction.com/
http://www.voidspace.org.uk/
http://www.trypython.org/
http://www.ironpython.info/
http://www.resolverhacks.net/
http://www.theotherdelia.co.uk/

_______________________________________________
Users mailing list
[email protected]
http://lists.ironpython.com/listinfo.cgi/users-ironpython.com

Reply via email to