Hello,
I'm implementing C# (and taking the opportunity to learn it along the way) scripting in the game+engine I'm developing using Mono, and comming from C++ I find it very odd having to "new MyStruct()" for very simple things such as:
myNode.position = new Vector3( 0f, 10f, 0f );
I wonder if this can be a performance problem later on when I have lots of scripts running, or if I should change the interface to something like "myNode.setPosition( 0f, 10f, 0f );" instead.
The syntax is also very weird, specially on even simpler things. For example, I have a Camera.fovY property which will accept radian values, and with the aim of making it obvious for the scripter, I have implemented it as being a Radian type, however actually using this thing is rather ugly:
myCamera.fovY = new Radian( 1.0f );
Should I worry about performance with this kind of thing, or should I ignore it and trust the JIT compiler will understand what I want?
Thanks.