1 decade ago by riceje7
So i am trying to call ClassB from ClassA in a plugin I'm writing, here's the structure:
i've generalized the names and such but the structure is identical
I am getting an uncaught reference error saying ClassB is not defined.
I know you can do this with `ig.Entity` by spawning the new entity and i thought that I had done it with `ig.Class` but i can't figure out what im doing wrong. can anyone help me out? if you need anymore info just ask. thanks
ig.module('plugin.plugin').requires('impact.impact').defines(function(){ ClassA = ig.Class.extend({ obj: null, ... randomFunc: function(){ this.obj = new ClassB(); } }); ClassB = ig.Class.extend({ init: function(){ ... } }); });
i've generalized the names and such but the structure is identical
I am getting an uncaught reference error saying ClassB is not defined.
I know you can do this with `ig.Entity` by spawning the new entity and i thought that I had done it with `ig.Class` but i can't figure out what im doing wrong. can anyone help me out? if you need anymore info just ask. thanks