My XNA game is component-oriented, and has various components for position, physics representation, rendering, etc, all of which extend a base Component
class. The player and enemies also have controllers which are currently defined in C#. I'd like to turn them into Python scripts, but via IronPython (a .NET implementation of Python). My problem is that I'm not sure how to interact with those scripts.
The examples in Embedding IronPython in a C# Application suggest I'd have to create a wrapper class (e.g.something like a Script
Script component) which compiles a Python script, and callcalls the controller's Update methods of the component in the script
Is this the most effective way of working with a Python object?method via Python - essentially, it'd be a wrapper class for C# to interface with Python.
I feel that I'm missing something in my research - there. There must be a way to load up a script, instantiate a Python object (either in the Python script or in C#) and then workthen have a directlydirect with it from withinreference to that Python object in my C# code. Or is the wrapper required?
Is there a way to work with an IronPython object directly, or is a wrapper required?