Hi folks,
I had previously been developing in js, then I started using Daikon Forge (love it btw) which uses c# and kinda created too much grief with references between js and cs scripts.
So, I’m converting all to c#, however I’m having trouble with a “class” of classes.
I had previously put a lot of classes in a single js script that were referenced in many scripts in many scenes. And there didn’t seem to be a problem.
Now that I’ve converted it to c# I can no longer just use the individual class name I seem to need to use the “class” of classes name with it.
For example:
In js
public class Scene {
var name : String;
}
Then in js code I would reference it like so:
public var scene : Scene;
function x(){
scene = new Scene;
scene.name = "beginning";
}
However in c# it is like this:
public class NrG_Classes {
public class Scene {
public string name;
}
}
And now I have to reference it like this:
public NrG_Classes.Scene scene;
public void x(){
scene = new NrG_Classes.Scene;
scene.name = "beginning";
}
My question is this:
Is it really necessary to include the “base” class name for the “subclasses” (not sure if I’m using that term correctly)?
Or is there a different way in c# to just use “Scene” instead of “NrG_Classes.Scene”?
Thank you for helping me out on this question.